Claim. Let $G$ be a group, $p$ be a prime number and $r \in \Bbb{N}$ such that $p^r$ divides $|G|$. If $n_G(p^r)$ is the number of subgroups of $G$ with order $p^r$. Show that $n_G(p^r) \equiv 1 \pmod{p}$.
I'm trying to proof this claim using group action. My professor gave me some hints, but I could not see some implications. I will to write a sketch of my attempt.
Sketch. Let $|G| = p^rm$ and $A$ the set $$A = \{S \subset G \mid |S| = p^r\}.$$ The map $g\cdot S = gS$ is an action of $G$ on $A$. Let $T \subset A$, then $$orb_G T = \{g\cdot T \mid g \in G\}.$$ There is $S \in (orb_G T)\cap A$ with $e \in S$. Define the action of $stab_G S$ on $S$ by $g \cdot s = gs$.
There is $k \leq r$ such that $$|stab_G S| = p^{k}\tag{1}$$
and so, $$|orb_G S| = p^{r-k}m.$$
Also, $$|orb_G S| = m \Longleftrightarrow S \leq G.$$ Therefore, $n_G(p^r)$ is the number of orbits of lenght $m$.
By the Conjugacy Class Equation $$|A| \equiv n_G(p^r)m\pmod{pm}.\tag{2}$$
From now on I think I can finish.
My problem is to justify $(1)$ and $(2)$. Thanks for the advance!
For the claim $(1)$, observe that $\text{Stab}_G(S)$ is a subgroup of $G$ and $\lvert G \rvert = p^r$. Hence $\lvert \text{Stab}_G(S) \rvert =p^k$ for some $k \leq r$ by Lagrange's theorem.
For the claim $(2)$, note that all orbits have size $p^{r-k}m$, so they are divisible by $pm$ unless their size is $m$. You have observed that this happens exactly when $S$ is a subgroup of $G$ and there are $n_G(p^r)$ subgroups. The union of orbits is $A$ proving the claim.