An enumeration of the population was provided for by the Constitution of the United States by Section 2, Article I. The purpose was to apportion the House of Representatives. However, the census record is also a very useful tool in historical and genealogical research. It is a tool with limits. Unfortunately, certain parts of the record have been destroyed or are otherwise incomplete. Individuals were often missed and information not accurately recorded.
The first federal census was compiled in 1790. It recorded only the names of the heads of households and the number of adult males, juvenile males, females, others, and slaves. The 1790 census for Maryland is one that survived and counted 319,728 individuals out of a total U.S. population of 3,893,635. Lanham households, including slaves, were 240 individuals. Every ten years following that another census was undertaken. The first census to include the District of Columbia was 1800. In 1850 it was decided to record the full names of everyone, their ages and the U.S. state or foreign countries of birth. In 1900 the month and year of birth was recorded.
Census information is most useful when correlated with other material. For example, if you wonder if your ancestress might have been a daughter of Zadock Lanham, son of Aaron Lanham, the 1800 and 1810 census records do not record any females in his household. His will of 1818 does not mention a wife or children and names his siblings as heirs. Taken together you have good evidence that Zadock is unlikely to be her father and can turn your attention to other possibilities.
I have transcribed census records for individuals and listed them in my alphabetical list of Lanhams in the main data collection. I also have a summary of the numbers of Lanhams living in various jurisdictions in Maryland or the District of Columbia for the period 1790-1900. Finally, I will transcribe the list of Lanhams appearing in individual census years.