The number of sets of chromosomes in a cell or an organism. For example, haploid means one set and diploid means two sets.