Number of binary $n \times m $ matrices where each $2 \times 2$ sub-matrix contains equal number of $0$s and $1$s 
Number of binary $n \times m $ matrices where each $2 \times 2$
sub-matrix contains equal number of $0$s and $1$s

I can't proceed any further than $2 \times m$ matrices. Thanks in advance.
Update: Okay I probably figured it out. Here's what I did:  If we take an $n \times (m-1)$ 'valid' matrix, the $m^{th}$ column is actually fixed by the previous column, that is, unless, the previous column contains alternating bits. If it does, then we have $2$ choices : either append the same as previous column, or append the bit-flipped previous column.
So we have $2^{n} - 2$ matrices where everything is fixed, and $2^m$ matrices with alternating bits. So we have $2^m + 2^n - 2$ matrices in total.
 A: Consider the first row.  If two adjacent bits are equal, their entire columns are set; and the entire board follows.  That is $2^m-2$.
Otherwise, every row alternates black and white, for another $2^n$.
A: Assume $n,m\ge3$. Then we find $i<j$ with  $a_{1,i}=a_{1,j}=:b$. Then $a_{2,i}=a_{2,j}=1-b$ and $a_{3,i}=a_{3,j}=1-b$, contradiction.
Therefore at least one of $n,m$ must be $\le 2$.
A: Consider a 3x3 matrix with all alternating bits:
$$
    \begin{bmatrix}
    1 & 0 & 1 \\
    0 & 1 & 0 \\
    1 & 0 & 1 \\
    \end{bmatrix}
$$
If you flip the bits in an entire row that is alternating, every submatrix containing a 1x2 segment of that row will maintain the same number of each type of bit. The same works for columns. So we can bit-flip the first row:
$$
    \begin{bmatrix}
    0 & 1 & 0 \\
    0 & 1 & 0 \\
    1 & 0 & 1 \\
    \end{bmatrix}
$$
Or the second column:
$$
    \begin{bmatrix}
    1 & 1 & 1 \\
    0 & 0 & 0 \\
    1 & 1 & 1 \\
    \end{bmatrix}
$$
But from this third matrix, we can't flip any of the rows--that would cause two 1x2 submatrices to flip from $ 0\ 0$ to $1\ 1$ or vice versa. Now you can ring the changes on what you have, looking at how many ways there are to bitflip n rows or m columns.
That should extend to $n \times m$ matrices, and I suspect you'll find a general form using the binomial theorem with some trial and error.
