# If $a = p^fb$ and $p \nmid b, 0 \leq f < e$, how many solutions exist for $z^2 \equiv a\ (mod\ p^e)$

For an odd prime $p$, if $a = p^fb$ and $p \nmid b, 0 \leq f < e$, how many solutions exist for $z^2 \equiv a\ (mod\ p^e)$.
I have already proved the previous part of this question which was to show that a solution exists if and only if $f$ is even and $b$ is quadratic modulo $p$.
If we let $b \equiv \beta^2\ (mod\ p^e)$, then $z^2 \equiv (p^{f/2}\beta)^2\ (mod\ p^e)$ which gives us $\pm\ p^{f/2}\beta$ as roots modulo $p^e$. How to find number of distinct roots among them?

-
I think you mean $b$ is quadratic modulo $p^e$, since the two notions are distinct. –  awllower Aug 31 '12 at 8:59
first proved that $b$ is quadratic modulo $p^e$ which is true iff $b$ is quadratic modulo $p$ hence the result. –  Abhishek Anand Aug 31 '12 at 10:37
Abhishek, 3 is a quadratic residue mod 2 but not mod 8, so I don't understand your comment. By the way, is $p$ supposed to be a prime? If yes, could you please edit this fact into the statement of the question? –  Gerry Myerson Aug 31 '12 at 13:02
Sorry Gerry, my bad!! $p$ is supposed to be an odd prime. –  Abhishek Anand Aug 31 '12 at 13:25
Abhishek, then 3 is a quadratic residue mod 3 but not mod 9. –  Gerry Myerson Aug 31 '12 at 13:29