input: def count_occurrences(string: str, substring: str) -> int:
      """Determine the number of times a specified substring appears within a given string, including overlapping instances.
      >>> count_occurrences('', 'a')
      0
      >>> count_occurrences('aaa', 'a')
      3
      >>> count_occurrences('aaaa', 'aa')
      3
      """
output:     count = start = 0
      while True:
          start = string.find(substring, start) + 1
          if start > 0:
              count += 1
          else:
              return count