library/Garp/Model/Db.php
public function count(Zend_Db_Select $select = null) {
        if (!$select) {
            $select = $this->select();
        }
        $select->from($this->getName(), array('count' => new Zend_Db_Expr('COUNT(*)')));
        if ($row = $this->fetchRow($select)) {
            return (int)$row->count;
        }
        return 0;
    }
public function count(Zend_Db_Select $select = null) {
        if (!$select) {
            $select = $this->select();
        }
        $select->from($this->getName(), array('count' => new Zend_Db_Expr('COUNT(*)')));
        if ($row = $this->fetchRow($select)) {
            return (int)$row->count;
        }
        return 0;
    }
public function count ( Zend_Db_Select $ select = null ) { if ( ! $ select ) { $ select = $ this -> select ( ) ; } $ select -> from ( $ this -> getName ( ) , array ( 'count' => new Zend_Db_Expr ( 'COUNT(*)' ) ) ) ; if ( $ row = $ this -> fetchRow ( $ select ) ) { return ( int ) $ row -> count ; } return 0 ; }
Returns the number of records in the database, optionally limited by
the provided select object.

@param Zend_Db_Select $select
@return Int Number of records
Returns the number of records in the database optionally limited by the provided select object .