I've been travelling around Asia for a few months and one recurring theme is that in important places in China and Taiwan the buildings have "Roof Charms" on them. When I first encountered them in the Forbidden City the audio guide explained that they signify which buildings are more important (the more charms, the more important the building is). After that, I encountered roof charms in a few places, most lately in the Chiang Kai-shek memorial area which is pretty modern but the buildings have variable number of roof charms, including multiple sets on the same building but on different roof floors. My experience in other location is also a pretty random number on each roof.
My question is whether the number of roof charms has any meaning and if so what is it?
(Searching google didn't give me a sufficiently good answer)