string.count()

string.count(s, sub[, start[, end]]) → int[source]

Return the number of occurrences of substring sub in string s[start:end]. Optional arguments start and end are interpreted as in slice notation.