The figure maybe labelled as shown:-
The squares composed of two components each are AIML, CKMJ, BJMI and DLMK i.e. 4 in number.
The squares composed three components each are AMDH. MCGD, BFCM and EBMA i.e. 4 in number.
The squares composed of four components each are VWBA, XYCB, ZADC. and B C AD i.e. 4 in number. The square composed of seven components each are NOJL. TUIK. RSLJ andPQKI i.e. 4 in number.
There is only one square i.e. ABCD composed of eight components.
These is only one square EFGH composed of twelve components.
∴Total number of squares =
4+4+4+4+1+1=18