Create a python program to print the total number of vowels in a given string
string = "This is a sample string "
def count_vowels(string):
    count = 0
    for character in string:
        if character in 'aeiouAEIOU':
            count += 1
    return count