The correct option is
D 30
Number of 1 x 1 squares = 16
They are:
ABGF, BCHG, CDIH, DEJI, FGLK, GHML, HINM, IJON, KLQP, LMRQ, MNSR, NOTS, PQVU, QRWV, RSXW, and STYX
Number of 2 x 2 squares = 9, i.e.,
ACMK, BDNL, CEOM, FHRP, GISQ, HJTR, KMWU, LNXV, and MOYW
Number of 3 x 3 squares = 4, i.e.,
ADSP, BETQ, FIXU, and GJYV
Number of 4 x 4 squares = 1, i.e., AEYU
Total number of squares = 16 + 9 + 4 + 1 = 30