How accurate is the Military rank in the general tab of statistics? For example, if I see that I have the number one deff in the whole world (that server) is that accurate?

General tab in stats
-
-
yes
that is always accurate.
For defense its account specific (it'll count all your offense troops defense power too) and for attack its village specific (it will count all troops off power that have that village as home village)