Ha, no, the census data they garner from historical records, mostly. That and piecing together information from the archeaological record.
But, actually, tree rings do identify sunlight and moisture and that then identifies where to focus for animal/human life changes accordingly.
another source of data may have been tax records. I have no specific information on Spanish taxing practices, but after 1066, William the Conqueror commissioned the Doomsday Book, which recorded every person in the conquered area of England, and their property.
Deat and taxes, death and taxes....