def vowel_count(string: str) -> int:  # I refactored
    """ Returns the number of vowels in the input string """
    if not isinstance(string, str):
        raise ValueError("The input to this function must be a string.")
    vowels = ["a", "e", "i", "o", "u"]
    return sum(1 for ch in string.lower() if ch in vowels)