The city or town council has power to take a census of the inhabitants of a city or town at any time.