def count_vowels(string):
    """Solution to exercise C-1.24.

    Write a short Python function that counts the number of vowels in a given
    character string.
    """
    count = 0
    vowel_list = list('aeiou')
    for char in string:
        if char in vowel_list:
            count += 1
    return count