Quadratic congruence There is question

For each of prime $p$, show that the congruence 
  $x^2 \equiv1 \pmod {p^a}$
  has precisely two solutions. 
Continue and show that the congruence
  $x^2 \equiv 1 \pmod {2^a} $
  has one solution if $a=1$, two solutions if $a=2$, and four solutions if $a \ge 3$.

I don't know how to do. Help please?

If $a\ge 3,$ and  $2^a\mid (x-1)(x+1), x$ must be odd,
So, $$2^{a-2}\mid \left(\frac{x-1}2\right)\left(\frac{x+1}2\right)$$
Now, $$\frac{x+1}2-\frac{x-1}2=1$$ So, $$\left(\frac{x-1}2,\frac{x+1}2\right)=1$$
Now, either $$2^{a-2}\mid  \left(\frac{x-1}2\right)$$ or $$2^{a-2}\mid  \left(\frac{x+1}2\right)$$
If $$2^{a-2}\mid  \left(\frac{x-1}2\right)\implies 2^{a-1}\mid(x-1)\implies x\equiv 1\pmod {2^{a-1}}\equiv 1,1+2^{a-1}\pmod {2^a}$$
