Answer: 40 squares
You can't just count the squares at face value. You'll need to get a little bit creative to come up with 40. There's a wonderful explanation below on how to come up with 40. You've got to count the squares very carefully. You'll also want to consider the size of each square - there are individual squares, as well as squares that are 4 X 4, 3 X 3 and 2 X 2.
Watch the video below for a visual explanation.