Counts documents in database

        :return: Number of documents in db
198911
def get_documents_count(self):
        
        db_collections = [
            self.database[c] for c in self.get_collection_names()
        ]  # list of all collections in database
        return sum([c.count() for c in db_collections])
783753
def count(self):
        
        cmd = ("select COUNT(*) from {table} "
               "{join_clause}{where_clause}{order_clause}").format(
                    table=self.table_name,
                    where_clause=self.where_clause,
                    join_clause=self.join_clause,
                    order_clause=self.order_clause).rstrip()
        return Repo.db.execute(cmd, self.where_values)
952963
def count(self, model, context):
        
        SELECT_COUNT = self.statement('SELECT COUNT')

        try:
            sql, data = SELECT_COUNT(model, context)
        except orb.errors.QueryIsNull:
            return 0
        else:
            if context.dryRun:
                print sql % data
                return 0
            else:
                try:
                    rows, _ = self.execute(sql, data)
                except orb.errors.EmptyCommand:
                    rows = []

                return sum([row['count'] for row in rows])
869366
def count(self):
        
        # Save the existing rows and start parameters to see how many results were actually expected
        _rows = self._solr_params.get('rows', None)
        _start = self._solr_params.get('start', 0)
        if not self._solr_cache:
            # Get the count for everything
            self.set_params(rows=0)
            self._exec_query()
        number = self._solr_cache.get('num_found', -1)

        # If start value is bigger or equal than solr results' count, should return 0
        # If there are 10 results, but if start value is specified as 30, should return 0.
        if _start >= number:
            return 0
        else:
            # If 'start' is specified, then this many results from the start will not be accessible.
            number -= _start
            # If 'rows' is NOT specified, then all results are accessible
            # (minus the ones skipped with 'start')
            if _rows is None:
                return number
            # If 'rows' is specified, then this many results at most will be accessible. If we have
            # more than this many results found, then we can say that this many results are
            # accessible. If there are less results found than rows, then we can't give more
            # than found results.
            return number if number < _rows else _rows
1188706
def count(self):
        '''
        
        '''
        args = self.format_args
        if args is None or \
                (isinstance(args, dict) and self.count_field not in args):
            raise TypeError("count is required")
        return args[self.count_field] if isinstance(args, dict) else args
1368936
def count(self):
        
        params = self.dump()
        params['limit'] = 0
        params['count'] = 1
        content = self._do_request(params)
        return content['count']
1188791
function count(req, res,next) {
  db.tags.count(function(err, count) {
    if(err) { return next(err); }
    res.json({count: count});
  });
}
122153
def get_count_sql(self):
        
        sql = 'SELECT COUNT(*) FROM ' + self.tables
        if len(self.where_clauses) > 0:
            sql += ' WHERE '
            sql += ' AND '.join(self.where_clauses)
        return sql
153677
public function count(): int
    {
        $collection = $this->documentManager->getCollection($this->documentClass);

        return $collection->count($this->query);
    }
46476
def count(self):
        
        return self.mapPartitions(lambda i: [sum(1 for _ in i)]).reduce(operator.add)
736140
def GetNumberOfRows(self):
    
    if not self._database_object:
      raise IOError('Not opened.')

    if self._number_of_rows is None:
      self._number_of_rows = self._database_object.GetNumberOfRows(
          self._table_name)

    return self._number_of_rows
1257199
def get_count(self, query):
        
        count_q = query.statement.with_only_columns(
            [func.count()]).order_by(None)
        count = query.session.execute(count_q).scalar()
        return count
875266
def count(self):
        
        self.request_params.update({'sysparm_count': True})
        response = self.session.get(self._get_stats_url(),
                                    params=self._get_formatted_query(fields=list(),
                                                                     limit=None,
                                                                     order_by=list(),
                                                                     offset=None))

        content = self._get_content(response)

        return int(content['stats']['count'])
1181578
def __total_pages(self) -> int:
        
        row_count = self.model.query.count()
        if isinstance(row_count, int):
            return int(row_count / self.limit)
        return None
594349
def count(self, query=None, indices=None, doc_types=None, **query_params):
        
        from .query import MatchAllQuery

        if query is None:
            query = MatchAllQuery()
        body = {"query": query.serialize()}
        path = self._make_path(indices, doc_types, "_count")
        return self._send_request('GET', path, body, params=query_params)
134484
def count_children(self, resource_id, db_session=None, *args, **kwargs):
        
        return self.service.count_children(
            resource_id=resource_id, db_session=db_session, *args, **kwargs
        )
1023037
def _get_hit_count(self, database, enquire):
        
        return self._get_enquire_mset(
            database, enquire, 0, database.get_doccount()
        ).size()