Census has been taken in Bavaria as early as 1770. The earlier censuses were only for statistical purposes. The census of December 1852 gave more details regarding the population. Age, sex, religion,occupations and buildings were registered. The same information was given in December 1867.
For more information see http://www.historisches-lexikon-bayerns.de/artikel/artikel_44809