code: def _countDigits(self, text):
          
          index = 0
          while index < len(text):
              if not text[index].isdigit():
                  break
              index += 1
          return index
docs: Count digits at start of text