I'm not sure if this is what you had in mind, but counting fixed points seem to come up often in elementary group theory, particularly in arguments involving group actions. In this setting, not only must you pick the right function (homomorphism of $G$ into an appropriate permutation group) but you also have to pick the correct "domain" (a suitable group $G$).
For example, one proof way to show that all $p$-Sylow subgroups of a group are conjugate involves counting fixed points of $p$-Sylow groups under conjugation by other $p$-Sylows; my favorite a simpler (and cuter!) example, though, is the proof that every group of size divisible by $p$ has an order-$p$ element. To the best of my memory, this (standard) proof is found in Hungerford: Suppose $G$ is a group with $p \mid |G|$, and let $U = { (g_1,\dots,g_{p-1},x): (g_1\cdot \dots \cdot g_{p-1})\cdot x =1_{G}}$, 1_{G} }$, i.e. the set of all$p$-tuples of elements in$G$whose product is the identity. Since$x$is uniquely determined by the$g_i$,$|U| = |G|^{p-1}$, so$p \mid |U|$as well. Now, letting$Z/pZ$act on$U$by cyclic permutation yields a fixed set with size divisible by$p$, but greater than one, for at least one non-trivial element$(g_1,\dots,g_{p-1},x) \in U$which is invariant under cyclic permutation, i.e. some$g_1=\dots=g_{p-1}=x \neq 1_{G}$. Consequently, we have$x^p = 1_{G}$, as desired. 1 [made Community Wiki] Counting fixed points seem to come up often in elementary group theory, particularly in arguments involving group actions. For example, one proof that all$p$-Sylow subgroups of a group are conjugate involves counting fixed points of$p$-Sylow groups under conjugation by other$p$-Sylows; my favorite example, though, is the proof that every group of size divisible by$p$has an order-$p$element. To the best of my memory, this (standard) proof is found in Hungerford: Suppose$G$is a group with$p \mid |G|$, and let$U = { (g_1,\dots,g_{p-1},x): (g_1\cdot \dots \cdot g_{p-1})\cdot x =1_{G}}$, i.e. the set of all$p$-tuples of elements in$G$whose product is the identity. Since$x$is uniquely determined by the$g_i$,$|U| = |G|^{p-1}$, so$p \mid |U|$as well. Now, letting$Z/pZ$act on$U$by cyclic permutation yields a fixed set with size divisible by$p$, but greater than one, for at least one non-trivial element$(g_1,\dots,g_{p-1},x) \in U$which is invariant under cyclic permutation, i.e.$g_1=\dots=g_{p-1}=x \neq 1_{G}$. Consequently, we have$x^p = 1_{G}\$, as desired.