original_string: public function count($alias = null)
      {
          if ($this->controller && $this->controller->hasMethod('count')) {
              return $this->controller->count($this, $alias);
          }
          throw $this->exception('The controller doesn\'t support count', 'NotImplemented')
              ->addMoreInfo('controller', $this->controller ? $this->controller->short_name : 'none');
      }
code: public function count($alias = null)
      {
          if ($this->controller && $this->controller->hasMethod('count')) {
              return $this->controller->count($this, $alias);
          }
          throw $this->exception('The controller doesn\'t support count', 'NotImplemented')
              ->addMoreInfo('controller', $this->controller ? $this->controller->short_name : 'none');
      }
code_tokens: public function count ( $ alias = null ) { if ( $ this -> controller && $ this -> controller -> hasMethod ( 'count' ) ) { return $ this -> controller -> count ( $ this , $ alias ) ; } throw $ this -> exception ( 'The controller doesn\'t support count' , 'NotImplemented' ) -> addMoreInfo ( 'controller' , $ this -> controller ? $ this -> controller -> short_name : 'none' ) ; }
docstring: Count records of model.
  
  @param string $alias Optional alias of count result
  
  @return int
docstring_tokens: Count records of model .