Factoring in this pi bond delocalization pattern makes the heterocycle have 6 pi electrons, which makes it and ultimately the entire compound aromatic. Again, this concept is based on the resonance that can occur where the exocyclic pi bond delocalizes into the ring and the pi bond already in the ring of interest (that is s-trans relative to the exocyclic pi bond) contributes to the formation of a carbanion whose electrons are delocalized and thus contribute to the Huckel number of pi electrons in the ring of interest according to the non-inclusive steric number calculation.