I'll assume that the question is how many $n\times n$ matrices with entries in $R=\Bbb Z/n\Bbb Z$ there exist that can be written as a sum of matrices with either single row of entries$~1$ and zeros elsewhere or a single column of entries$~1$ and zeros elsewhere, for $n=2013$. (By subtracting off that sum, the matrix can then be reduced to the zero matrix over $R$, and "addition is just repeated subtraction".)
If $n$ were a prime number, the answer would be $n^{2n-1}$ by simple linear algebra: the $n$ generating "row-matrices" and the $n$ generating "column matrices" each obviously span a vector space of dimension $n$ over the field$~R$, the two vector spaces of matrices being characterised by equality of all entries along rows respectively along columns. The intersection of these vector subspaces contains all matrices with all entries equal, and has dimension$~1$, so that the sum of the two subspaces is a subspace of dimension $n+n-1=2n-1$, which has $n^{2n-1}$ elements.
Now $n=2013=3\times11\times61$ is not prime, but the answer is still $n^{2n-1}$ in this case. To see this one basically reasons that the sum can be made direct by removing one generating element from one of the generating sets. So let us forbid using the matrix will entries$~1$ in the final row and zeros elsewhere, after all that matrix can be written as the sum of all "column matrices" minus the sum of all other row matrices. I claim that the remaining generators form an $R$-linearly independent set. Consider an $R$-linear combination giving the zero matrix. Since each entry in the final row occurs only in one generating element (a column matrix), the fact that the combination gives the zero matrix implies that that generating element has zero coefficient in the linear combination; this takes care of the column matrices. But a nontrivial $R$-linear combination of row matrices is clearly never zero, so we must have had the trivial linear combination of generators. As a consequence of the independence, all $n^{2n-1}$ possible $R$-linear combinations give distinct results, and by definition those are all the matrices that need to be counted.