Census has been taken in Bavaria as early as 171834-1867. The earlier censuses were only head counts. 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.
More information see http://www.historisches-lexikon-bayerns.de/artikel/artikel_44809