Yeah, I can't work it out either. Are bonus multipliers factored into the hammer calculation? (For instance, if an Imperialistic civ builds a Settler, does their hammer count go up in the demographics screen?)
I made some tests and it seemed like in all cases the hammers seemed to be "real" hammers. I tested with Joao and built Worker, settler and Stonehenge using stone. From the demographics it seems that there aren't anyone with more than 1 city (max population is about the same as ours). I've BUG installed. Hopefully it doesn't affect to these numbers.
My guess is that the capital has at least bronze and corn and it would be founded in the plains hill. This itself gives ~8 food and ~8 hammers. Then there could be 3*mined grassland hills and 1 plains hill => 11 Food and 21 Hammers. So 20 hammers is very much possible scenario. Even with just 2 resources and if there are horses or cows this would be even easier.