Show $r(x)|G|=\sum_{g\in G}|Fix(g)|^2$ where $(G,X)$ is a transitive group and $r(x)$=#{different orbits of X under $Stab(x)$} Let $(G,X)$ be a transitive group action, that is, for any $x,y\in X$,there exists an element $g\in G$ s.t. $g*x=y$. Fix $x\in X$. Let $r(x)$ be the number of different orbits of $X$ under $Stab(x)$. Show that  $r(x)|G|=\sum_{g\in G}|Fix(g)|^2$.
 A: $\DeclareMathOperator{\Stab}{Stab}$
Let $G$ be a finite group acting on a finite set $X$, not necessarily transitively.  For $g \in G, x \in X$, let $\delta_{g,x} = 1$ if $g$ fixes $x$, and $0$ if not. Then $$|\textrm{Fix}(g)| = \sum\limits_{x \in X} \delta_{g,x}$$ $$|\Stab(x)| = \sum\limits_{g \in G} \delta_{g,x}$$
 where $\textrm{Fix}(g)$ is the set of $x \in X$ such that $g.x = x$. 
Also, $|O(x)| = \frac{|G|}{|\Stab(x)|}$, where $O(x) = O_G(x)$ is the orbit of $x$. by the orbit stabilizer theorem. 
Lemma:  Let $r$ be the number of orbits of $X$ under the action of $G$.  Then
$$r = \sum\limits_{y \in X} \frac{1}{|O(y)|}$$
Proof: Obvious.  $\blacksquare$
Now, assume $G$ acts transitively on $X$.  For each $x \in X$, let $r(x)$ be the number of orbits of $X$ under the action of $\textrm{Stab}(x)$.  For $x, y \in X$, there exists a $g \in G$ such that $g.x = y$ by transitivity.  Then $g \textrm{Stab}(x)g^{-1} = \Stab(y)$, and $g$ maps the orbits of $X$ under $\Stab(x)$ bijectively to the orbits under $\Stab(y)$.  So we see that $r = r(x)$ does not depend on $X$.  We have
$$\sum\limits_{g \in G} |\textrm{Fix}(g)|^2 = \sum\limits_{g \in G} \sum\limits_{ x,y \in X} \delta_{g,x} \delta_{g,y} = \sum\limits_{x \in X} \sum\limits_{y \in X}  \sum\limits_{g \in G} \delta_{g,x}\delta_{g,y} = \sum\limits_{x \in X} \sum\limits_{y \in Y}|\Stab(x) \cap \Stab(y)|$$ 
For a fixed $x$, we can view $\Stab(x) \cap \Stab(y)$ as the stabilizer of $y$ with respect to the group $\Stab(x)$.  The orbit stabilizer theorem, applied to the group $\Stab(x)$, then makes the last sum
$$\sum\limits_{x \in X}  \sum\limits_{y \in Y} \frac{|\Stab(x)|}{|O_{\Stab(x)}(y)|}$$
Finally we apply the Lemma to the group $\Stab(x)$, getting
$$\sum\limits_{x \in X} |\Stab(x)| \sum\limits_{ y\in Y} \frac{1}{|O_{\Stab(x)}(y)|} = \sum\limits_{x \in X} |\Stab(x)|r = |X| \cdot |\Stab(x)|r = |G|r$$
where the last equality comes from the transitivty of $G$ acting on $X$ and the orbit stabilizer theorem.
