In The Laws, Plato offers a somewhat bizarre criterion for the right population size for the polis: maximize the ways the total number of citizens can be divided into equal-sized groups:
Let’s assume we have a convenient number of five thousand and forty farmers and protectors of their holdings… divide the total first by two, then by three: you’ll see it can be divided by four and five and every number right up to ten. Everyone who legislates should have sufficient appreciation of arithmetic to know what number will be most use in every state, and why. So let’s fix on the one which has the largest number of consecutive divisors. Of course, an infinite series of numbers would admit all possible divisions for all possible uses, but our 5,040 admits no more than 59… which will have to suffice for purposes of war and every peace time activity, all contracts and dealings, and for taxes and grants. (Penguin Classics, 2004: 159-160)There you have it: the ideal state should have 5040 citizens, because 5040 can be evenly divided by so many integers!