The horizontal lines are DE, FH, IL and BC i.e. 4 in number.
The slanting lines are AC, DO, FN, IM, AB, EM and HN i.e. 7 in number.
Thus, there are 4 + 7 = 11 straight lines in the figure.

The simplest triangles are AHG, AIG, AIB, JFE, CJE and CED i.e. 6 in number.
The triangles composed of two components each are ABG, CFE, ACJ and
EGI i.e. 4 in number.
The triangles composed of three components each are ACE, AGE and
CFD i.e. 3 in number.
There is only one triangle i.e. AHE composed of four components.
Therefore, There are 6 + 4 + 3 + 1 = 14 triangles in the given figure.

The simplest triangles are AEH, EHI, EBF, EFI, FGC, IFG, DGH and HIG i.e. 8 in number.
The triangles composed of two components each are HEF, EFG, HFG and EFG i.e. 4 in number.
Thus, there are 8 + 4 = 12 triangles in the figure.

The simplest triangles are ABG, BCG, CGE, CDE, AGE and AEF i.e. 6 in number.
The triangles composed of two components each are ABE, ABC, BCE and ACE i.e. 4 in number.
There are 6 + 4 = 10 triangles in the figure.

The simplest squares are QUYX, URVY, YVSW and XYWT i.e. 4 in number.
The squares composed of two components each are IMYP, MJNY, YNKO and PYOL i.e. 4 in number.
The squares composed of three components each are AEYH, EBFY, YFCG and HYGD i.e. 4 in number.
There is only one square i.e. QRST composed of four components.
There is only one square i.e. IJKL composed of eight components.
There is only one square i.e. ABCD composed of twelve components.
Total number of squares in the given figure = 4 + 4 + 4+1 + 1 + 1 = 15.