Can you calculate the total number of square in the given figure?

Hard Square Count

The total number of squares are 24.Refer to the attached picture to know the insight about how we calculated them.