def validate_password(policy, password):
    """Validate password based on policy."""
    (minimum, maximum), char = policy
    count_char = password.count(char[0])
    return minimum <= count_char <= maximum