Can you find out the number of squares in the given picture?

There are 12 squares in the picture.

The trick to find it would be drawing diagonals. We know that the sides of a square are parallel and thus, the diagonals should be parallel as well. Let us begin with the outer most rectangle. See the picture. The yellow lines are diagonals drawn for reference.

You can make out four squares in the image.

Now see the next image. You can make out a total of 8 squares - 3 blue, 3 green and 2 red. There are 4 other rectangles in the figure but they can't be square as their diagonal is not parallel with the yellow lines we drew for reference.

Thus, total squares = 4 + 8 = 12.