The figure may be labelled as shown:
The squares composed to two components each, are ABKJ, BCLK, CDEL, LEFG, KLGH and JKHI.
Thus, there are 6 such squares. Only one square, KCEG is composed of four components.
Two squares namely, ACGI and BDFH are composed of eight components each.
Thus, there are 2 such squares.
∴ There are 6 + 1 + 2 = 9 squares in the given figure.