Let $p>2$ be a prime number, $n$ a natural number and $a$ an element of $\mathbb{Z}_{p^n}$. Is it possible to count the number of solutions of $x^2=a$ in $\mathbb{Z}_{p^n}$?
For example if $a=0$ then it is easy but for the general case I have no idea.
Also It is clear that if $x^2=a$ has a solution in $\mathbb{Z}_{p^n}$ then it should have a solution in the field $\mathbb{Z}_{p}$.
Partial answer:
If $p$ does not divide $a$, then $x^2=a$ has zero or two solutions, because $x^2=1$ has two solutions since $\mathbb{Z}_{p^n}^{\times}$ is cyclic.