public function count()
    {
        $this->db()->table($this->table)->groupBy($this->table . '.' . $this->primaryKey);
        $this->hasOne()->belongsToMany();
        $count = $this->db()->count($this->primaryKey);
        return $count;
    }
public function count()
    {
        $this->db()->table($this->table)->groupBy($this->table . '.' . $this->primaryKey);
        $this->hasOne()->belongsToMany();
        $count = $this->db()->count($this->primaryKey);
        return $count;
    }
public function count ( ) { $ this -> db ( ) -> table ( $ this -> table ) -> groupBy ( $ this -> table . '.' . $ this -> primaryKey ) ; $ this -> hasOne ( ) -> belongsToMany ( ) ; $ count = $ this -> db ( ) -> count ( $ this -> primaryKey ) ; return $ count ; }
Returns the total number of models

@param string $column Column to count by
@return int Total number of models
Returns the total number of models