Puzzler IV Solution

How many squares (of any size) can you find in the figure above?  (Don’t forget to count . . .)

SOLUTION:  There are 40 squares, notably . . .

18 squares of side length 1 *

9 squares of side length 2

4 squares of side length 3

1 square of side length 4

8 squares of side length (1/2).

TOTAL:  40

*

 * (counting the two overlapping ones in the middle)