public function count()
    {
        $cls     = $this->_cls;
        $pk      = $cls::getPK();
        $builder = $this->_makeBuilderForAggregations(" count($pk) ");
        return $this->_executeAndReturnFirst($builder, $this->_vals);
    }
public function count()
    {
        $cls     = $this->_cls;
        $pk      = $cls::getPK();
        $builder = $this->_makeBuilderForAggregations(" count($pk) ");
        return $this->_executeAndReturnFirst($builder, $this->_vals);
    }
public function count ( ) { $ cls = $ this -> _cls ; $ pk = $ cls :: getPK ( ) ; $ builder = $ this -> _makeBuilderForAggregations ( " count($pk) " ) ; return $ this -> _executeAndReturnFirst ( $ builder , $ this -> _vals ) ; }
Return collection row count

Example:
echo Person::all()->count();

@return int row count
Return collection row count