def count_overlapping(text: str, sub: str) -> int:
    """The number of overlapping occurrences of the substring sub in text."""
    count = 0
    start = 0
    i = 0
    while i >= 0:
        i = text.find(sub, start)
        if i >= 0:
            count += 1
            start = i+1

    return count