Let's say I have an arbitrary matrix $A \in \mathbb{R}^{2 \times 2}$
$$A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}$$
And I want to find a matrix $B$ such that $BB = A$. How can I find the total number of possible $B$'s that satisfy this condition?
What I was thinking of, was set up a system of equations to solve for each entry $a_{ij}$ in terms of $b_{ij}$, via dot-products, like so:
$$\begin{align}a_{11} &= {b_{11}}^2 + b_{12}\cdot b_{21} \\ a_{12} &= b_{11} \cdot b_{12} + b_{12}\cdot b_{22} \\ a_{21} &= b_{11} \cdot b_{21} + b_{22}\cdot b_{21} \\ a_{22} &= b_{21}\cdot b_{12} + {b_{22}}^2 \end{align}$$
But as you can see this is not a linear system of equations, and there's no method I currently know of to solve for the unknowns in this system, other than simply guessing and playing around to see which values could work.
And this only a $2 \times 2$ matrix, it would be impossible to find out this way how many square roots exist for a $n \times n$ matrix.
So my question is: How many square roots exist for $A \in \mathbb{R}^{n \times n}$ and what method can be used to find all of those square roots?