Pattern occurrence count
Your task
Count how many times a pattern occurs in a text when overlapping occurrences count separately. The pattern is non-empty; either string may otherwise be anything. For example, 'aa' occurs 4 times in 'aaaaa' (starting at indexes 0, 1, 2, and 3), and 'aba' occurs 3 times in 'abababa'.
Examples
count_overlapping(text: str, pattern: str) -> intExample 1
Input
count_overlapping("aaaaa", "aa")Output
4