Solution:
We can focus on only the black cells of the grid, which we need 32 of. Moreover, the number of black squares in the bottom row and leftmost column uniquely determine the total number of black squares. Suppose that there are x black cells in the bottom row and y black cells in the leftmost column. Then, each of the x rows with black leftmost cell is identical to the bottom row and has y black cells, while the remaining 8−x rows are inverted and have 8−y black cells, so the total number of black cells is
(8−x)(8−y)+xy=32
This rearranges as
2(x−4)(y−4)=0
which tells us we have 32 black cells exactly when either the bottom row or leftmost column (or both) contains 4 black cells.
The bottom-left corner is already black. There are (37) ways to choose three more cells in the bottom row or leftmost column to be black, and 27 ways to color the remaining cells in the bottom row or leftmost column with no restrictions. Hence, there are 27(37) ways for the bottom row to have 4 black cells, 27(37) ways for the leftmost column to have 4 black cells, and (37)2 ways for both to occur. The answer is
2(27)(37)−(37)2=7735