Aromaticity of heterocyclic compound
Actually not all of the last three are aromatic.  Look carefully at the third compound; the heteroatom is boron, not nitrogen, and so does not contribute the electron pair that would be needed to make six pi electrons in an aromatic ring.  That compound  is instead antiaromatic.

So JAM 2017 is apparently rendering both of the first two compounds as aromatic.  This, however, is dubious.  The first compound in the list is a pyrone, which not everyone would call aromatic.  To make an aromatic contributing structure in pyrone we would have to render the carbonyl group as its zwitterionic structure ($\ce{C^+-O^-}$) and then distribute the positive charge around the ring which has an electronegative oxygen atom.  We'd have to weigh the favorable effect of aromaticity against the unfavorable effect of putting a positive charge into an electronegative ring.

As for the second compound, we would need to "polarize" two carbonyl groups and concentrate two positive charges into the small ring, and that is not happening even with aromaticity.  There is a saving grace, however: if the $\ce{N-H}$ protons are tautomerized onto the oxygen atoms, converting the "keto" structure to its "enol" form, then the tautomerized molecule is 2,4-dihydroxy-1,3-diazine, which would be unambiguously aromatic.

What it boils down to is that aromaticity is often not the simple yes/no question often suggested in introductory chemistry texts.  Given this ambiguity, one could potentially defend an answer of 2, 3, or 4 (but not the last three for the two larger numbers) to the JAM 2017 question.