rom/query.py
def count(self):
        '''
        Will return the total count of the objects that match the specified
        filters.::

            # counts the number of users created in the last 24 hours
            User.query.filter(created_at=(time.time()-86400, time.time())).count()
        '''
        filters = self._filters
        if self._order_by:
            filters += (self._order_by.lstrip('-'),)
        if not filters:
            # We can actually count entities here...
            size = _connect(self._model).hlen(self._model._namespace + '::')
            limit = self._limit or (0, 2**64)
            size = max(size - max(limit[0], 0), 0)
            return min(size, limit[1])

        return self._model._gindex.count(_connect(self._model), filters)
def count(self):
        '''
        Will return the total count of the objects that match the specified
        filters.::

            # counts the number of users created in the last 24 hours
            User.query.filter(created_at=(time.time()-86400, time.time())).count()
        '''
        filters = self._filters
        if self._order_by:
            filters += (self._order_by.lstrip('-'),)
        if not filters:
            # We can actually count entities here...
            size = _connect(self._model).hlen(self._model._namespace + '::')
            limit = self._limit or (0, 2**64)
            size = max(size - max(limit[0], 0), 0)
            return min(size, limit[1])

        return self._model._gindex.count(_connect(self._model), filters)
def count ( self ) : filters = self . _filters if self . _order_by : filters += ( self . _order_by . lstrip ( '-' ) , ) if not filters : # We can actually count entities here... size = _connect ( self . _model ) . hlen ( self . _model . _namespace + '::' ) limit = self . _limit or ( 0 , 2 ** 64 ) size = max ( size - max ( limit [ 0 ] , 0 ) , 0 ) return min ( size , limit [ 1 ] ) return self . _model . _gindex . count ( _connect ( self . _model ) , filters )
Will return the total count of the objects that match the specified
        filters.::

            # counts the number of users created in the last 24 hours
            User.query.filter(created_at=(time.time()-86400, time.time())).count()
Will return the total count of the objects that match the specified filters . ::