A module with 300 elements I have got this problem. Let it be $R=M_{2}(\mathbf{Z})$ the ring of square matrices over the integers. I need to find a $R$-module with $300$ elements and one question for this problem, can be there a $R$-module with $500$ elements?
For that I though about this...
A module in particular it is an abelian group, in this case it will be isomorphic to $\mathbf{Z}_{300}$ which is a $\mathbf{Z}$-module and I was trying define a ring homomorphism 
$\phi:M_{2}(\mathbf{Z})\rightarrow \mathbf{Z}$
with that I can give to $\mathbf{Z}_{300}$ the structure of  $R$-module.
I don't know if I am correct so I need your help.
Bye..
 A: You will not find a(unital) ring homomorphism $\phi:M_2(\mathbb Z)\to\mathbb Z$, for there is none. 
Since $e_1=\begin{pmatrix}1&0\\0&0\end{pmatrix}$ and $e_2=\begin{pmatrix}0&0\\0&1\end{pmatrix}$ are such that $e_1^2=e_1$ and $e_2^2=e_2$, we would have to have $\phi(e_1)^2=\phi(e_1)$ and $\phi(e_2)^2=\phi(e_2)$. Now the only idempotent elements in $\mathbb Z$ are $0$ and $1$. Since $e_1+e_2$ is the identity element of the matrix ring, we must have $\phi(e_1)+\phi(e_2)=1$ in $\mathbb Z$. It follows easily from this that one of $\phi(e_1)$ or $\phi(e_2)$ is zero. Since $e_1$ and $e_2$ are conjugated matrices in the matrix ring, then both have zero image.
This is absurd.

$\def\End{\operatorname{End}}$Suppose $M$ is a $M_2(\mathbb Z)$ module of order $300$, so that there is a ring homomorphism $g:M_2(\mathbb Z)\to\End_{\mathbb Z}(M)$, where $\End_{\mathbb Z}(M)$ denotes the ring of endomorphisms of $M$ as an abelian group. 
As an abelian group, we have $M\cong M_2\times M_3\times M_5$, where $M_p$ denotes the (unique!) $p$-Sylow subgroup of $M$. Since there are no homomorphisms from $M_p$ to $M_q$ if $p$ and $q$ are distinct primes, one can easily check that there is an endomorphism of rings $\End_{\mathbb Z}(M)\cong\End_{\mathbb Z}(M_2)\times\End_{\mathbb Z}(M_3)\times\End_{\mathbb Z}(M_5)$. Composing the map $g$ with the projection $\End_{\mathbb Z}(M)\to\End_{\mathbb Z}(M_3)$ we get a ring homomorphism $M_2(\mathbb Z)\to\End_{\mathbb Z}(M_3)$.
Now $M_3$ is cyclic of order $3$, so $\End_{\mathbb Z}(M_3)$ is $\mathbb Z/3\mathbb Z$ as a ring, and we have a ring homomorphism $$M_2(\mathbb Z)\to\mathbb Z/3\mathbb Z.$$ Clearly, the ideal $3M_2(\mathbb Z)$ is in the kernel of this, so this passes on to the quotient to give us a homomorphism $$M_2(\mathbb Z/3\mathbb Z)\cong M_2(\mathbb Z)/3M_2(\mathbb Z)\to \mathbb Z/3\mathbb Z.$$
Now an argument similar to the one above shows there is no such map, so we reached a contradicton! It follows that there is no module of order $300$.

Let us find out what are the orders of the finite $M_2(\mathbb Z)$-modules. As observed above, if $M$ is such a module of order $n$, and $p_1$, $\dots$, $p_r$ are the distinct primes which divide $n$, then $M=\prod_{i=1}^rM_{p_i}$ with $M_{p_i}$ the $p_i$-Sylow subgroup. One can easily check that each $M_{p_i}$ is an $M_2(\mathbb Z)$-submodule of $M$. Since the order of $M$ is the product of the orders of the $M_{p_i}$, we can suppose that $n=p^m$ is a power of a prime. In that case, $M$ is a $M_2(\mathbb Z/p^s\mathbb Z)$-module.
Now the ring $M_2(\mathbb Z/p^s\mathbb Z)$ is Morita equivalent to $A=\mathbb Z/p^s\mathbb Z$. The latter is Artinian, has finitely many indecomposable modules and their orders are $p$, $p^2$, $\dots$, $p^s$. The functor from $A$-modules to $M_2(\mathbb Z/p^s\mathbb Z)$-modules is $M\leadsto A^2\otimes_AM$, which on the level of the abelian groups is just the cartesian square. It follows that the indecomposable $M_2(\mathbb Z/p^s\mathbb Z)$ are finite in number, and their orders are $p^2$, $\dots$, $p^{2s}$.
Wrapping it all up, we see that the orders of the finite $M_2(\mathbb Z)$-modules are precisely the perfect squares.
