Dapatkan Jumlah Kejadian Kasus Substring Independent Python

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