python_ref_string_count_2.py:
x
 
txt = "I love apples, apple are my favorite fruit"
x = txt.count("apple", 10, 24)
print(x)