code: def parameter_count(funcsig):
      
      return sum(
          param.kind in {param.POSITIONAL_OR_KEYWORD, param.POSITIONAL_ONLY}
          for param in funcsig.parameters.values()
          if param.default is Parameter.empty
      )
docs: Get the number of positional-or-keyword or position-only parameters in a
      function signature.
  
      Parameters
      ----------
      funcsig : inspect.Signature
          A UDF signature
  
      Returns
      -------
      int
          The number of parameters