It is true that the eigenvalues (counting multiplicity) of $AB$ are the same as those of $BA$.

This is a corollary of [Theorem 1.3.22 in the second edition of "Matrix Analysis" by Horn and Johnson](https://books.google.co.uk/books?id=5I5AYeeh0JUC&lpg=PP1&dq=horn%20and%20johnson&pg=PA65#v=onepage&q=horn%20and%20johnson&f=false), which is Theorem 1.3.20 in the first edition.

Paraphrasing from the cited Theorem: If $A$ is an $m$ by $n$ matrix and $B$ is an $n$ by $m$ matrix with $n \geq m$
then the characteristic polynomial $p_{BA}$ of $BA$ is related to the characteristic polynomial $p_{AB}$ of $AB$ by
$$p_{BA}(t) = t^{n-m} p_{AB}(t).$$

In your case, $n = m$, so $p_{BA} = p_{AB}$ and it follows that the eigenvalues (counting multiplicity) of $AB$ and $BA$ are the same.

You can see Horn and Johnson's proof in the Google Books link above. A similar proof was given in this [answer](https://math.stackexchange.com/q/311362) from Maisam Hedyelloo.