code: def count_divisors(n):
  
      
  
      if not isinstance(n, int):
          raise TypeError("Expecting a strictly positive integer")
      if n <= 0:
          raise ValueError("Expecting a strictly positive integer")
  
      number_of_divisors = 1
      remain = n
  
      for p in prime_generator():
          if p > n:
              return number_of_divisors
  
          exponent = 1
          while remain % p == 0:
              remain = remain // p
              exponent += 1
          number_of_divisors *= exponent
  
          if remain == 1:
              return number_of_divisors
docs: Count the number of divisors of an integer n
  
      Args:
          n (int): strictly positive integer
  
      Returns:
          The number of distinct divisors of n
  
      Raises:
          TypeError: if n is not an integer
          ValueError: if n is negative