This puzzle could have almost have been given the
tag, though that may have given a big hint.
You can think of each rectangle you pick as a move,
which you want to combine, like lights-out, such that each black square is picked an odd number of times, and each white square an even number of times. You can do this by picking the 8 rectangles consisting of every other row, and every other column, such that they intersect on only white squares. Those intersected white squares have obviously been picked twice. There are also white squares that are not included in any chosen rectangle, so are picked zero times. Every black square lies inside exactly one of the chosen rectangles.
If you then combine the parity results of those 8 rectangles, you get the parity of just the black squares because the white squares at the intersections are included twice and therefore do not affect the parity.
This solution is not unique. You can make the four horizontal rectangles wider, letting them overlap, as long as every other row is used in an odd number of rectangles, and the other rows an even number of times. The same is true for the set of four vertical rectangles.
Here is a proof for why this is the minimal number of rectangles:
(Thanks to loopywalt for plugging the final gap in the proof)
Consider two adjacent squares, one black, one white. If every rectangle we pick contains either both or neither of those squares, then we would not be able to distinguish a bean under the white square from a bean under the black square. Therefore at least one of our rectangles has an edge going inbetween the two squares. This is true for all adjacent squares, so we need the rectangles to cut along all the seams of the board.
Let's only consider adjacent squares that lie on the border of the board. There are 14 vertical pairs and 14 horizontal pairs that need to be cut. A rectangle can cut through at most 4 such pairs - and then it will cut only 4 horizontal pairs if it 8 units high, and only cut 4 vertical pairs if it is 8 units wide. If a rectangle does not cut 4 pairs of the same type, then it cuts only 2 or 0. This shows that 7 rectangles are not sufficient because each would have to cut 4 pairs of the same type, and the number of pairs of each type is not a multiple of 4. It can be done with 8 rectangles however, so 8 is optimal.
There exist optimal solutions in which some rectangles are used that are not 8 units long or wide. For example, you could use three horizontal rectangles consisting of rows 2, 4&5, and 7, three similar vertical rectangles, together with two 4x4 rectangles at diagonally opposite corners of the board.