Let $A=\left(\begin{array}{ll}2 & -2 \\ 1 & -1\end{array}\right)$ and $B=\left(\begin{array}{ll}-1 & 2 \\ -1 & 2\end{array}\right)$. Then the number of elements in the set $\left\{(n, m): n, m \in\{12 \ldots, 10\}\right.$ and $\left.n A n+m B^m=I\right\}$ is $\_\_\_\_$