proof of counting theorem
Let be the cardinality of the set of all the couples such that . For each , there exist couples with as the first element, while for each , there are couples with as the second element. Hence the following equality holds:
From the orbit-stabilizer theorem it follows that:
Since all the belonging to the same orbit contribute with
in the sum, then precisely equals the number of distinct orbits . We have therefore
which proves the theorem.