int common = -1; while( (common = FindEntityByClassname(common, "infected")) != INVALID_ENT_REFERENCE ) numCommon++;