search_string : String to be searched for matching inside main string. start: Optional , search can be started from this position end : Optional , search can be ended just before this position.
my_str="Welcome to plus2net.com"
print(my_str.count('co')) # Output is 2
print(my_str.count('co',4)) # Output is 1
print(my_str.count('co',4,18)) # Output is 0
print(my_str.count('o',4,9)) # Output is 1
print(my_str.count('o',4,10)) # Output is 2
Note : In last line in above code the char o is at 4th and 94th position.