Answer:
204
There is one 8x8 square, the outer border of the figure.
There are four 7x7 squares, one aligned with each corner. Another
way to count these four squares is to note that each of their upper left
corners is aligned with one of the four corners of the upper left small
square.
There are nine 6x6 squares. To count them, note that each of
their upper left corners is aligned with one of the nine corners of the
four small squares in the upper left corner of the figure.
Similarly, there are 16 5x5 squares, 25 4x4 squares, etc.
The number of squares in the figure is the sum of the squares
1+4+9+16+25+36+49+64, which is 204.
In case you're curious, the sum of the first n squares is given by the
formula (2n³+3n²+n)/6. Formulas for sums of
the first n numbers of a given power are always polynomials of degree one
higher than the given power. For example, the sum of fourth powers
is given by a fifth degree polynomial.
See the "related pages"
section, below, for references to pages in this website that explain this
a bit further.