Erhalten Sie eine Anzahl der Vorkommen von Substring -Fallunabhängiger Python

import re
_, count = re.subn(r'hello', '', astring, flags=re.I)
print('Found', count, 'occurrences of "hello"')
Difficult Dormouse