How do I go about making Population Segments

A population segment is a group of residents, such as a city with 1 million people or a town with 10,000 people.

How would I make a population segment using a population number variable (Population = 1M) , and for all the segments to add up equal to the population size.