/* Returns the number of records not successfully rendered.
541262
private int
sectionToWire(DNSOutput out, int section, Compression c,
	      int maxLength)
{
	int n = sections[section].size();
	int pos = out.current();
	int rendered = 0;
	Record lastrec = null;

	for (int i = 0; i < n; i++) {
		Record rec = (Record)sections[section].get(i);
		if (lastrec != null && !sameSet(rec, lastrec)) {
			pos = out.current();
			rendered = i;
		}
		lastrec = rec;
		rec.toWire(out, section, c);
		if (out.current() > maxLength) {
			out.jump(pos);
			return n - rendered;
		}
	}
	return 0;
}
859244
public int getNumberOfResults()
    {
        final String numberOfResults = agiReply.getAttribute("results");
        return numberOfResults == null ? 0 : Integer.parseInt(numberOfResults);
    }
98655
function getPageCount() {
		if (!$this->limit) {
			return 1;
		}
		$rem = ($this->getTotal() % $this->limit);
		$rem = ($rem >= 0) ? $rem : 0;
		$total_pages = ($this->getTotal() - $rem) / $this->limit;
		if ($rem)
			$total_pages++;
		return $total_pages;
	}
1062663
public function numRows($result_object,$which_connection='')
    {
        if (!is_object($result_object)) {
            return false;
        }

        if ($which_connection == '') {
            $which_connection = $this->default_db;
        }

        return $result_object->RecordCount();
    }
355470
public function totalCount()
    {
        if ($this->skipTotalRecords) {
            return true;
        }

        return $this->totalRecords ? $this->totalRecords : $this->count();
    }
1254770
public function count()
    {
        $select = clone $this->select;
        $select->reset(Select::COLUMNS);
        $select->columns([
            'c' => $this->raw('COUNT(*)')
        ]);
        
        $rows = $this->loadRecords($select);
        if (isset($rows[0]['c'])) {
            return (int)$rows[0]['c'];
        }
        
        return false;
    }
1275448
function count()
    {
        if ( $this->count !== null )
            return $this->count;

        if ( $this->query === null )
        {
            $this->query = $this->generateSQL();
        }
        if ( $this->query === false )
            return 0;
        $query = "SELECT count(*) AS count {$this->query}";
        $db = eZDB::instance();
        $rows = $db->arrayQuery( $query );
        if ( count( $rows ) == 0 )
            $this->count = 0;
        else
            $this->count = $rows[0]['count'];
        return $this->count;
    }
79905
@Override
    public int countMissing() {
        int count = 0;
        for (int i = 0; i < size(); i++) {
            if (TextColumnType.missingValueIndicator().equals(get(i))) {
                count++;
            }
        }
        return count;
    }
1266271
@Override
    public int rowCount() {
        int result = 0;
        if (!columnList.isEmpty()) {
            // all the columns have the same number of elements, so we can check any of them
            result = columnList.get(0).size();
        }
        return result;
    }
1061755
function count(req, res, next) {
  db.users.count(function(err, count) {
    if(err) { return next(err); }
    res.json({count: count});
  });
}
346454
function count(req, res) {
  var list = getList.call(this);
  return res.send(null, list.length);
}
31560
function () {
            var self = this,
                count = 0,
                _queryMap,
                k;
            parseQuery(self);
            _queryMap = self._queryMap;
            for (k in _queryMap) {

                if (S.isArray(_queryMap[k])) {
                    count += _queryMap[k].length;
                } else {
                    count++;
                }

            }
            return count;
        }
862088
@Override
  public int count() {

    int listSize = getList().size();
    int pageSize = getPageSize();
    int pageCount = listSize / pageSize;

    pageCount += listSize % pageSize > 0 ? 1 : 0;

    return pageCount;
  }
145151
public static int getBatchUpdateCount(int[] batchExecuteResult){
		int result = 0;
		for (int c: batchExecuteResult){
			if (c >= 0){
				// real count
				result += c;
			}else if (c == -2){
				// unknown
				return -2;
			}else{
				// error or others
				// do nothing
			}
		}
		return result;
	}
1178679
@Override
	public int getNumberLeaves() {
		while (true) {
			try {
				int result = 0;
				for (Slot slot: subSlots){
					result += slot.getNumberLeaves();
				}
				return result;
			}
			catch (ConcurrentModificationException e) {
				// ignore and retry
			}
		}
	}
956816
function ()
		{
			var
				len      = this._iDisplayLength,
				start    = this._iDisplayStart,
				calc     = start + len,
				records  = this.aiDisplay.length,
				features = this.oFeatures,
				paginate = features.bPaginate;
	
			if ( features.bServerSide ) {
				return paginate === false || len === -1 ?
					start + records :
					Math.min( start+len, this._iRecordsDisplay );
			}
			else {
				return ! paginate || calc>records || len===-1 ?
					records :
					calc;
			}
		}
1359499
private int getTupleDataRowCount(List<DBBPool.BBContainer> outputBuffers) {
        if (outputBuffers == null || outputBuffers.size() != m_tableTasks.size()) return 0;
        int accumulator = 0;
        for (int i = 0; i < outputBuffers.size(); ++i) {
            SnapshotDataTarget target = m_tableTasks.get(i).m_target;
            int rowCount = target.getInContainerRowCount(outputBuffers.get(i));
            if (rowCount != SnapshotDataTarget.ROW_COUNT_UNSUPPORTED) {
                accumulator += target.getInContainerRowCount(outputBuffers.get(i));
            }
        }
        return accumulator;
    }