The correct option is D 22
Consider the longest vertical strip. It has six rectangles (excluding squares).
In the second vertical strip there are 3 rectangles. In the second vertical strip there are 3 rectangles.
This pattern is repeated with the largest horizontal strip and the second horizontal strip.
Next consider the third vertical and horizontal strips. Each has one rectangle.
Again, consider two vertical and horizontal strips together. Each has one rectangle.
Hence total no. of rectangles =2(6+3+1+1)=22
Hence, option D is the correct answer.