Keep counting.24, right???

You didn't forget the big one.

Keep going.Tried again. Got 32

42..if a square within a square is correct?
nah there's 40. I think the other 2 you're coming up with are rectangles.
Counting from biggest to smallest...you got the big one. Then count squares that are 3x3, there's the 4 of those. then the ones that are 2x2, there's 9 of those, then the single squares, there's 18 of those, then the tiny squares...8 of those. 40