Checks the resource collision.

@param count
If we are testing W/W conflict, total # of write counts.
For R/W conflict test, this value should be set to {@link Integer#MAX_VALUE}.
330082
public boolean isCollidingWith(Resource that, int count) {
        assert that!=null;
        for(Resource r=that; r!=null; r=r.parent)
            if(this.equals(r) && r.numConcurrentWrite<count)
                return true;
        for(Resource r=this; r!=null; r=r.parent)
            if(that.equals(r) && r.numConcurrentWrite<count)
                return true;
        return false;
    }
257694
public synchronized void release(int count) {
        used -= count;
        if (used < 0)
            used = 0; // no negative number of ticket!
        if (logger.isDebugEnabled())
            logger.debug("Released " + count + " tickets! (Now " + this.toString() + ")");
        notifyAll();
    }
333364
void reset(int count) {
      if (counter != null)
         counter.releaseShared(count);
      available.releaseShared(count);
   }
624927
def record_value(self, value, count=1):
        '''
        '''
        if value < 0:
            return False
        counts_index = self._counts_index_for(value)
        if (counts_index < 0) or (self.counts_len <= counts_index):
            return False
        self.counts[counts_index] += count
        self.total_count += count
        self.min_value = min(self.min_value, value)
        self.max_value = max(self.max_value, value)
        return True
1068889
private static boolean containsCollisionFormula(TileCollision tile, CollisionCategory category)
    {
        final Collection<CollisionFormula> formulas = tile.getCollisionFormulas();
        for (final CollisionFormula formula : category.getFormulas())
        {
            if (formulas.contains(formula))
            {
                return true;
            }
        }
        return false;
    }
1261582
public boolean hasConflicts() {
        int count = 0;
        for(DocumentRevisionNode n : leafs) {
            if(!n.getData().isDeleted()) {
                count ++;
                if(count > 1) {
                    return true;
                }
            }
        }
        return false;
    }
111150
public synchronized int skip(int count) {
        if (count > available) {
            count = available;
        }
        idxGet = (idxGet + count) % capacity;
        available -= count;
        return count;
    }
350
private void countPropertyReference(UsageStatistics usageStatistics,
			PropertyIdValue property, int count) {
		addPropertyCounters(usageStatistics, property);
		usageStatistics.propertyCountsReferences.put(property,
				usageStatistics.propertyCountsReferences.get(property) + count);
	}
722328
def writeConflicts(self):
        """"""
        if not self._counters_calculated:
            self._counters_calculated = True
            self._extract_counters()

        return self._writeConflicts
375491
public int count(T x, T y, int count) {
        if (count < 1)
            throw new IllegalArgumentException("Count must be positive: " + count);
        long index = getIndex(x, y);
        int oldCount = counts.get(index);
        int newCount = count + oldCount;
        counts.put(index, newCount);
        sum += count;
        return newCount;
    }
417473
public void incrementCount(List<K> l, double count) {
    if (l.size() != depth) {
      wrongDepth(); //throws exception
    }

    GeneralizedCounter<K> next = this;
    Iterator<K> i = l.iterator();
    K o = i.next();
    while (i.hasNext()) {
      next.addToTotal(count);
      next = next.conditionalizeHelper(o);
      o = i.next();
    }
    next.incrementCount1D(o, count);
  }
1365801
public void tally( Statistics other )
    {
        rightCount += other.rightCount();
        wrongCount += other.wrongCount();
        ignoredCount += other.ignoredCount();
        exceptionCount += other.exceptionCount();
    }
166295
public void incrementSync(String distributedObjectName, int count) {
        getOrPutIfAbsent(eventCounterMap, distributedObjectName, EVENT_COUNTER_CONSTRUCTOR_FN)
                .incrementSyncCount(count);
    }
998768
private function checkCount(){
        $cnt = (int) $this->getMaxEntries();
        if ($cnt !== NULL && count($this->values) !== $cnt){
            trigger_error("Wrong count of Elements. Expected are $cnt. But right now there are ". count($this->values));
        }

    }
84834
public static function maxCount($value, int $maxCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        return count($value) <= $maxCount;
    }
543046
private void countPropertyQualifier(UsageStatistics usageStatistics,
			PropertyIdValue property, int count) {
		addPropertyCounters(usageStatistics, property);
		usageStatistics.propertyCountsQualifier.put(property,
				usageStatistics.propertyCountsQualifier.get(property) + count);
	}
412143
private void computeMaxSize() {
		threshold = (int) (elementKeys.length * loadFactor);
		if (log.isDebugEnabled()) {
			log.debug(this.getClass().getName() + "::computeMaxSize()=" + threshold + " collisions="
					+ collisions + " (" + (collisions * 100 / elementKeys.length) + ")");
		}
		collisions = 0;
	}