One question is when can you do it at all. The question of how many ways then depends on what you consider as different and, in any case, will be difficult to answer exactly. For any $k$, $m=2$ is possible and the counts are easy. I'll discuss $m=3$ and leave $m=4$ as an exercise. For $m \gt 4$ I think it would be pretty difficult to get counts.
As I understand it, you want for given $n,m,k$ to know if there is an $m \times n$ array filled with two symbols $a,b$ so that each pair of rows agrees in exactly $k$ positions. And, if so, how many "different" ones there are.
You used $0,1$ for the symbols but it turns out that $1,-1$ are nicer (and of course that does not change the problem.) It looks cleaner to use $\overline 1$ to denote $-1$ so I will.
Here in an example with $10,3,4$
$A=\left[ {\begin{array}{cccccccccc}1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1\\ 1 & 1 & 1 & 1 & \overline 1 & \overline 1 & \overline 1 & \overline 1 & \overline 1 & \overline 1\\1 & \overline 1 & \overline 1 & \overline 1 & 1 & 1 & 1 & \overline 1 & \overline 1 & \overline 1\end{array} } \right]$
Note that $$AA^t=\left[ {\begin{array}{ccc}10 & -2 & -2 \\ -2 & 10 & -2\\ -2 & -2 & 10 &\end{array} } \right].$$ In general one wants an $m \times n$ matrix $A$ filled with $1$ and $\overline 1$ such that the $m \times m$ product $AA^t$ has $n$ on the diagonal and $2k-n$ off it. See if you can figure out why that forces $m \leq n.$
$A$ would remain an example if the rows and or the columns were permuted in any manner. Also we could swap $1$ and $\overline1$ in any column or columns to get the first row to be as we desire. That does not affect the number or pattern of matches. So for this very small case $10,3,4$ I will say that there must be exactly one column where everything matches and , if I decree that the first row is all $1$ that gives $\frac{10!}{1!3!3!3!}=16800$ possibilities. Multiply by $2^{10}$ if you want arbitrary first row. If you consider row swaps as giving the same thing the counts would, of course, be smaller.
In general $n,3,k$ is possible exactly when $j=\frac{n-k}{3}$ is an integer. Then, with first row all $1$ one would have $n-3j$ columns with three $1$s and each of the other three possible columns with a $1$ on top $j$ times.
If one has an example for $n,m,k$ and deletes some rows one has an example for $n,m',k$ so the question of existence is perhaps:
Given $n,k$ what is the largest $2 \leq m \leq n$ such that there is an $n,m,k$ example?
It would not preserve the example above if we multiplied a row by $-1$.
Then it would instead have $n-k$ matches and $k$ non-matches with all the rest.
In the special case that $n=2k$ we can do that so one generally assumes that the first row and first column are all $1$s.
For $n=2k$ one wants $AA^t$ to be an $nI_m.$ For $AA^t=nI_n$ these are called Hadamard matrices. As you can tell, much is know but there are open questions.