public function findCount(array $criteria = array())
    {
        list ($common_sql, $params) = $this->createCommonFindSql($criteria);

        $sql = 'SELECT COUNT(*) ' . $common_sql;

        return $this->conn->fetchColumn($sql, $params) ?: 0;
    }
public function findCount(array $criteria = array())
    {
        list ($common_sql, $params) = $this->createCommonFindSql($criteria);

        $sql = 'SELECT COUNT(*) ' . $common_sql;

        return $this->conn->fetchColumn($sql, $params) ?: 0;
    }
public function findCount ( array $ criteria = array ( ) ) { list ( $ common_sql , $ params ) = $ this -> createCommonFindSql ( $ criteria ) ; $ sql = 'SELECT COUNT(*) ' . $ common_sql ; return $ this -> conn -> fetchColumn ( $ sql , $ params ) ? : 0 ; }
Count users that match the given criteria.

@param array $criteria
@return int The number of users that match the criteria.
Count users that match the given criteria .