import re print len(re.findall('[аяоёыиэеую]', 'Привет, мир!')) # => 3
inp = open('input.txt').read()
matches = re.findall('[аяоёыиэеую]', inp)
print len(matches)