public static function count($where = array())
    {
        // fetch the count with $where parameters
        $rawSqlFetch = self::select(array("count(*) as nb"), $where);

        return isset($rawSqlFetch[0]) && isset($rawSqlFetch[0]['nb']) ? (int)$rawSqlFetch[0]['nb'] : null;
    }
public static function count($where = array())
    {
        // fetch the count with $where parameters
        $rawSqlFetch = self::select(array("count(*) as nb"), $where);

        return isset($rawSqlFetch[0]) && isset($rawSqlFetch[0]['nb']) ? (int)$rawSqlFetch[0]['nb'] : null;
    }
public static function count ( $ where = array ( ) ) { // fetch the count with $where parameters $ rawSqlFetch = self :: select ( array ( "count(*) as nb" ) , $ where ) ; return isset ( $ rawSqlFetch [ 0 ] ) && isset ( $ rawSqlFetch [ 0 ] [ 'nb' ] ) ? ( int ) $ rawSqlFetch [ 0 ] [ 'nb' ] : null ; }
Count number of model in database from criteria

@param array $where - associative array ex:
simple criteria        array('idMarque' => 1)
custom operator        array('idMarque' => array('operator' => '<=','value' => ''))
raw SQL                array('idMarque' => array('IN (5,6,4)'))

@return int | null
Count number of model in database from criteria