public static function count($criteria = array())
    {
        self::processCriteriaWithType($criteria);
        $count = self::connection()->count(self::collectionName(), $criteria);
        return $count;
    }
public static function count($criteria = array())
    {
        self::processCriteriaWithType($criteria);
        $count = self::connection()->count(self::collectionName(), $criteria);
        return $count;
    }
public static function count ( $ criteria = array ( ) ) { self :: processCriteriaWithType ( $ criteria ) ; $ count = self :: connection ( ) -> count ( self :: collectionName ( ) , $ criteria ) ; return $ count ; }
Count of records

@param array $criteria

@return integer
Count of records