Why are there only 2 solutions for $x^n=1$? (where $n&gt;0$)

I have been taught that an equation with the highest power $n$ will always have $n$ solutions. This does not appear to be the case with:
$$x^n=1 \implies x=\pm1$$
Where $n$ is even, the solutions are $1$ and $-1$; where $n$ is odd, the only solution is $1$.

Why? Is it a special case, or is there something I'm missing?
It has $n$ roots, but only if you consider roots $x_i\in \Bbb C$. These "special" ones are calleds the roots of unity.

As an example, consider $X^4=1$; try to check that $X_1=i$ is a root of said equation.
Notice, we have $$x^n=1$$ $$x=(1)^{1/n}$$ $$=(\cos 0+i\sin 0)^{1/n}$$ $$=(\cos 2k\pi+i\sin2k\pi)^{1/n}$$ $$=\left(\cos \left(\frac{2k\pi}{n}\right)+i\sin\left(\frac{2k\pi}{n}\right)\right)$$ Thus there are $n$ roots which can be determined by setting $k=0, 1, 2, \ldots (n-1)$