code: public function countTokenKind($tokenKind)
      {
          if (self::isLegacyMode()) {
              throw new \RuntimeException(sprintf('%s is not available in legacy mode.', __METHOD__));
          }
  
          return isset($this->foundTokenKinds[$tokenKind]) ? $this->foundTokenKinds[$tokenKind] : 0;
      }
docs: @param int|string $tokenKind
  
  @return int