Before the census was made an official part of the US Constitution in1790, censuses had been used through out history mainly to tax (remember Joseph and Mary?) and to conscript youth into military service.
The census aims to count the whole population of a country and mark where exactly they live. It records their sex, age and race. It records their sex, age and race. As the census website (and a recent banner over Gurley street) says, "the goal is to count everyone once. only once, and in the right place.