Returns the number of rows matched by this query
558011
def count(self):
        
        if self._batch:
            raise CQLEngineException("Only inserts, updates, and deletes are available in batch mode")

        if self._result_cache is None:
            query = self._select_query()
            query.count = True
            result = self._execute(query)
            return result[0]['count']
        else:
            return len(self._result_cache)
1044746
public function count()
    {
        if ($this->_rowCount === null) {
            $rowCount = $this->_query->count();
            $this->setRowCount($rowCount);
        }

        return $this->_rowCount;
    }
893004
public int count(List<Match> matches) {

        Query query = queryGenerator.getCountQuery(matches);
        // 执行操作
        String sql = query.getSql();
        return countBySQL(sql, query.getParams());
    }
209921
def num_results_for query={}
    xapian_query = build_xapian_query query
    matchset = run_query xapian_query, 0, 0, 100
    matchset.matches_estimated
  end
938416
def sparql_count(self, query, flush=None):
        
        return self.count_statements(query, language='sparql', type='tuples',
            flush=flush)
5594
public function num_rows()
	{
		// sqlsrv_num_rows() doesn't work with the FORWARD and DYNAMIC cursors (FALSE is the same as FORWARD)
		if ( ! in_array($this->scrollable, array(FALSE, SQLSRV_CURSOR_FORWARD, SQLSRV_CURSOR_DYNAMIC), TRUE))
		{
			return parent::num_rows();
		}

		return is_int($this->num_rows)
			? $this->num_rows
			: $this->num_rows = sqlsrv_num_rows($this->result_id);
	}
1263489
async def count(self, query, clear_limit=False):
        
        query = self._swap_database(query)
        return (await count(query, clear_limit=clear_limit))
1270558
def count(self):
        """"""
        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._count
586761
public int countMatches() {
		if (null != this.positions && this.positions.isPresent()) {
			return this.positions.get().size();
		}
		
		if (Strs.isEmpty(target4Betn)) {
			return 0;
		}
		
		if (!region.isPresent()) {
			return 0;
		}
		
		if (isEqual(region.get()[0], region.get()[1])) {
			int matchCount = count(target4Betn, region.get()[1]);
			
			if (this.matchWay.get() == 'R' 
					|| this.matchWay.get() == 'L') {
				return matchCount;
			}
			
			matchCount = (matchCount % 2 == 0) ? matchCount : (matchCount - 1);
			return matchCount / 2;
		}
		
		return Math.min(count(target4Betn, region.get()[0]), count(target4Betn, region.get()[1]));
	}
1047018
public function count()
    {
        if (empty($this->queryString)) {
            $builder = clone $this->builder;
            $builder->resetQueryPart('orderBy');
            $stmt = $builder->execute();
        } else {
            $stmt = $this->connection->executeQuery($this->queryString, $this->queryParams);
        }

        return (int) $stmt->rowCount();
    }
1246602
def count(cls, *criteria, **filters):
        """"""
        return cls.query.filter(*criteria).filter_by(**filters).count()
1304432
def count(self, query, _or=False):
        
        if isinstance(query, str):
            return self.fm.count(query, MapIntInt({}))
        else:
            search_results = []
            for q in query:
                dids = MapIntInt({})
                self.fm.search(q, dids)
                search_results.append(dids.asdict())
            merged_dids = self._merge_search_result(search_results, _or)
            counts = 0
            for did in merged_dids:
                if _or:
                    counts += reduce(add, [int(x.pop(did, 0)) for x in search_results])
                else:
                    counts += min([int(x.pop(did, 0)) for x in search_results])
            return counts
297143
def count_matches(self):
        """"""

        try:
            self.fn = self.fo.name
            rows = self.file_rows(self.fo)
            self.fo.seek(0)

        except AttributeError:
            with open(self.fn) as fo:
                rows = self.file_rows(fo)

        matches_p = []
        matches_c = []
        for line in rows:
            cnt = len(re.findall(DATPRX, line))
            matches_p.append(cnt)
            cnt = len(re.findall(DATCRX, line))
            matches_c.append(cnt)

        self.rows = rows        # Is newlines in the end a problem?
        self.matches_p = matches_p
        self.matches_c = matches_c
713960
def count(self, **query_dict):
        """"""
        param_dict = query_dict.copy()
        param_dict['count'] = 0
        resp_dict = self._get_query(**param_dict)
        return resp_dict['response']['numFound']
1291998
function getNumMatches(fileList, queryExpr) {
    var i,
        matches = 0;
    for (i = 0; i < fileList.length; i++) {
        var temp = countNumMatches(getFileContentsForFile(fileList[i]), queryExpr);
        if (temp) {
            numFiles++;
            matches += temp;
        }
        if (matches > MAX_TOTAL_RESULTS) {
            exceedsMaximum = true;
            break;
        }
    }
    return matches;
}
615053
private function obtainNumRows()
    {
        $count = 0;
        while (false !== $this->stmt->fetch(PDO::FETCH_NUM)) {
            $count = $count + 1;
        }
        $this->stmt->execute();
        return $count;
    }
527902
def count(self, with_limit_and_skip=False):
        ''' 
        '''
        return self.__get_query_result().cursor.count(with_limit_and_skip=with_limit_and_skip)