Utility for doing ctx.getCounter(groupName,
counter.toString()).increment(1);
423991
@SuppressWarnings("rawtypes")
	public static void incCounter(TaskInputOutputContext ctx, String groupName, Enum counter) {
		ctx.getCounter(groupName, counter.toString()).increment(1);
	}
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);
  }
750729
def incr_counter(self, *args, **kwargs):
        
        threshold = kwargs.get("threshold", self.batch_counter_default)
        if len(args) == 2:
            # backwards compatibility with existing hadoop jobs
            group_name, count = args
            key = (group_name,)
        else:
            group, name, count = args
            key = (group, name)

        ct = self._counter_dict.get(key, 0)
        ct += count
        if ct >= threshold:
            new_arg = list(key) + [ct]
            self._incr_counter(*new_arg)
            ct = 0
        self._counter_dict[key] = ct
767733
private void reportCounter(final String name, final Counter counter) {
		send(name, String.valueOf(counter.getCount()));
	}
1220117
public int getCount (K key)
    {
        CountEntry<K> entry = _backing.get(key);
        return (entry == null) ? 0 : entry.count;
    }
1184760
@VisibleForTesting
    Counter getCounter(Level level, StackTraceElement stackTraceElement) {
        final String fullyQualifiedClassName = changePeriodsToDashes(stackTraceElement.getClassName());
        //final String lineNumber = Integer.toString(stackTraceElement.getLineNumber());
        @SuppressWarnings("UnnecessaryLocalVariable")
        final String key = fullyQualifiedClassName/* + ':' + lineNumber*/;
        if (!ERRORS_COUNTERS.containsKey(key)) {
            final Counter counter = factory.createCounter(
                    metricObjects, subsystem, fullyQualifiedClassName, /*lineNumber, */level.toString());

            // It is possible but highly unlikely that two threads are in this if() block at the same time; if that
            // occurs, only one of the calls to ERRORS_COUNTERS.putIfAbsent(hashCode, counter) in the next line of code
            // will succeed, but the increment of the thread whose call did not succeed will not be lost, because the
            // value returned by this method will be the Counter put successfully by the other thread.
            ERRORS_COUNTERS.putIfAbsent(key, counter);
        }
        return ERRORS_COUNTERS.get(key);
    }
8406
function incrementCounter(adunit) {
  adUnits[adunit] = adUnits[adunit] || {};
  adUnits[adunit].counter = (deepAccess(adUnits, `${adunit}.counter`) + 1) || 1;
  return adUnits[adunit].counter;
}
138485
public static int countByG_T_E(long groupId, String type, boolean enabled) {
		return getPersistence().countByG_T_E(groupId, type, enabled);
	}
733079
public long incrementAndGet(V value) {
        synchronized (countMap) {
            countMap.put(value, getCount(value) + 1);
            return countMap.get(value);
        }
    }
1192661
public void incrementAll(CounterMap<F, S> other) {
        for (Map.Entry<F, Counter<S>> entry : other.maps.entrySet()) {
            F key = entry.getKey();
            Counter<S> innerCounter = entry.getValue();
            for (Map.Entry<S, AtomicDouble> innerEntry : innerCounter.entrySet()) {
                S value = innerEntry.getKey();
                incrementCount(key, value, innerEntry.getValue().get());
            }
        }
    }
1311502
public void incrementCount(F first, S second, double inc) {
        Counter<S> counter = maps.get(first);
        if (counter == null) {
            counter = new Counter<S>();
            maps.put(first, counter);
        }

        counter.incrementCount(second, inc);
    }
246856
def increment(self):
        ''''''

        for i in xrange(len(self._counter) - 1, -1, -1):
            self._counter[i] += 1

            if self._counter[i] < 256: break

            # Carry the one
            self._counter[i] = 0

        # Overflow
        else:
            self._counter = [ 0 ] * len(self._counter)
416410
public int incrementCounter(CmsDbContext dbc, String name) throws CmsException {

        return getVfsDriver(dbc).incrementCounter(dbc, name);
    }
146457
public static int getCount(Matcher matcher) {
        int counter = 0;
        matcher.reset();
        while (matcher.find()) {
            counter++;
        }
        return counter;
    }
1159076
@Override
	public int countByG_C(long groupId, String couponCode) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_C;

		Object[] finderArgs = new Object[] { groupId, couponCode };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(3);

			query.append(_SQL_COUNT_COMMERCEDISCOUNT_WHERE);

			query.append(_FINDER_COLUMN_G_C_GROUPID_2);

			boolean bindCouponCode = false;

			if (couponCode == null) {
				query.append(_FINDER_COLUMN_G_C_COUPONCODE_1);
			}
			else if (couponCode.equals("")) {
				query.append(_FINDER_COLUMN_G_C_COUPONCODE_3);
			}
			else {
				bindCouponCode = true;

				query.append(_FINDER_COLUMN_G_C_COUPONCODE_2);
			}

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(groupId);

				if (bindCouponCode) {
					qPos.add(couponCode);
				}

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
831765
public <T2 extends T> void incrementAll(Counter<T2> other) {
        for (T2 element: other.keySet()) {
            double cnt = other.getCount(element);
            incrementCount(element, cnt);
        }
    }
1022873
private CounterColumn populateCounterFkey(String rlName, Object rlValue) {
        CounterColumn counterCol = new CounterColumn();
        counterCol.setName(PropertyAccessorFactory.STRING.toBytes(rlName));
        counterCol.setValue((Long) rlValue);
        return counterCol;
    }