samples/PhotoAlbum/lib/rb.php
public function count($beanType,$addSQL = '',$params = array()) {
		$sql = "SELECT count(*) FROM {$this->safeTable($beanType)} ";
		if ($addSQL!='') $addSQL = ' WHERE '.$addSQL; 
		return (int) $this->adapter->getCell($sql.$addSQL,$params);
	}
public function count($beanType,$addSQL = '',$params = array()) {
		$sql = "SELECT count(*) FROM {$this->safeTable($beanType)} ";
		if ($addSQL!='') $addSQL = ' WHERE '.$addSQL; 
		return (int) $this->adapter->getCell($sql.$addSQL,$params);
	}
public function count ( $ beanType , $ addSQL = '' , $ params = array ( ) ) { $ sql = "SELECT count(*) FROM {$this->safeTable($beanType)} " ; if ( $ addSQL != '' ) $ addSQL = ' WHERE ' . $ addSQL ; return ( int ) $ this -> adapter -> getCell ( $ sql . $ addSQL , $ params ) ; }
Counts rows in a table.

@param string $beanType type of bean to count
@param string $addSQL   additional SQL
@param array  $params   parameters to bind to SQL

@return integer $numRowsFound
Counts rows in a table .