def count_valid_passports(passports, validation_method):
    """ Count valid passports

    :param passports: List of passports
    :param validation_method: validation method
    :return: int
    """
    counter = 0
    for passport in passports:
        if validation_method(passport):
            counter += 1

    return counter