I can't give you any math but it includes unit numbers, to a lesser extent unit tech (e.g. tank counts more than warrior), and military buildings (barracks, stables, etc). If you upgrade a large number of units in one turn but don't build any new ones that turn, you will still see the ratio rise. How accurate it is, I don't know but it does give you a relative idea of strength.