Here is a recursive formula: Let $A_M(N,L,K)$ be the number of matrices with $N$ columns and $M$ rows such that
- all columns have an even number of ones
- there are a total of $2K$ ones
- the number of rows with an odd number of ones is $2L$.
Then $A_M(N,0,K)$ is the number we want to compute and for $N>0$: $$A_M(N,L,K) =
\sum_{k=0}^K \sum_{l=0}^K A_M(N-1,l,k) {2l \choose K-k-L+l}
{M-2l\choose K-k+L-l}.$$
From the definition we can see that $A_M(0,0,0) = 1$ and $A_M(0,L,K)=0$ for $L>0$ or $K>0$.
Reasoning is: We enumerating all matrices that can appear if we delete the last column. Assume we obtain a matrix with $2k$ ones and $2l$ rows with an odd number of ones. Then in the last column we add $2(K-k)$ ones of which $l_1$ are written in rows where there have been an odd number of ones before, and $l_2$ where the number of ones was even. Then $$2(K-k) = l_1+l_2 \\ 2L = 2l-l_1+l_2$$ from which we conclude $$l_1 = K-k-L+l \\l_2 = K-k+L-l.$$ Therefore, there are ${2l \choose l_1} {M-2l\choose l_2}$ ways to obtain the desired matrix.
Out of the $b$ columns, you have $a$ sets of columns with each set having $b/a$ elements each with $1$ in the same place. Goal is to choose $x$ columns, each from a different set.
For $x > a$, the answer is $0$, and henceforth, we assume $x \leq a$. If $x=1$, the answer is $1$. If $x=2$, we just need to ensure that the second picked column is not from the set of the first, that is, it is from the $b - b/a$ columns. The probability of the latter is $(b - b/a)/(b - 1)$
Extending this argument to $x$, we have the probability $p(x)$
$$p(x) = \frac{(b - 0b/a)}{b}\frac{(b - b/a)}{b - 1}\frac{(b - 2b/a)}{b - 2}...\frac{(b - (x - 1)b/a)}{b - x + 1}$$
$$p(x) = \frac{(b - x)!\prod\limits_{k = 0}^{x - 1}\left(b - \frac{kb}{a}\right)}{b!}$$
After some rearrangement
$$p(x) = \frac{(b - x)!(b/a)^{x}a!}{(a - x)!b!}$$
Alternatively, the last equation can be reached at by considering the total number of column permutations that we can select to be $\frac{b!}{(b - x)!}$, and to count the specific permutations we want, we first count the number of ways to permute $x$ items from $a$ different sets $\left(\frac{a!}{(a-x)!}\right)$. In each of these permutations, for each of the elements of $x$, we have $b/a$ choices since there are $b/a$ columns in every such set. The latter gives us the factor of $(b/a)^x$.
Best Answer
Hint: If $m=1$ or $n=1$, the problem is simple. So suppose they are both $\gt 1$.
Fill in everything with $0$'s and/or $1$'s except the bottom row and the rightmost column, in an arbitrary way.
Forget temporarily about the bottom right-hand corner. There is exactly one way to choose the rest of the bottom row and the rest of the rightmost column.
Now show that the bit in the bottom right corner that makes the sum of the full bottom row have even sum is the same bit that makes the full rightmost column have even sum. For this, use an old accounting principle.
Remark: For the question that was mentioned but not asked (odd sums) there will be parity considerations involving $m$ and $n$,