I'm studying quadratic congruences with composite moduli, something of the form:
$$x^2\equiv a\pmod n$$
where $\gcd(a;n)=1$, but something I can't manage to find is how many solutions does one of them actually have without, well, solving it directly. I know that if $n=p$ a prime the congruence has either $0$ or $2$ incongruent solutions but what can we say about the general case ? Is there a general formula or at least some applicable in specific cases (different from the one that I mentioned).
edite note: actually I know how to solve this kind of equation decomposing the modulus and using the Chinese reminder theorem so I'm only interested in determining the number of solutions without actually compute them.