I don't know anything about India specifically, however, regimes around the world have been attempting to count the number of people under their jurisdiction for several thousand years. In Britain, the Domesday Book was compiled from 1085-1086 to find out " How many hundreds of hides were in the shire, what land the king himself had, and what stock upon the land; or, what dues he ought to have by the year from the shire."
The most famous example is surely the Roman Empire which conducted a census numerous times during the many years that it existed for. (Jesus was born in Bethlehem as a result of one of these events!) At the time of Jesus, the empire required everyone to return to the town where they were born to register, this can hardly be considered accurate, however, as people almost certainly didn't go where they were supposed to or were missed however it provides a good estimate.
The Roman census in 234 BC as an example was for 270,713 civium capita, most historians agree this figure only includes men over the age of 17.
Hopefully some of this helps!