used by count_2()
182174
private static int merging2_2(int[] buffer, int x) {
		int cnt1 = buffer[x + 1];
		int cnt2 = buffer[x + 3];
		final int w = buffer[x + 5];
		cnt1 = cnt1 - ((cnt1 >>> 1) & 0x55555555) + (w & 0x55555555);
		cnt2 = cnt2 - ((cnt2 >>> 1) & 0x55555555) + ((w >>> 1) & 0x55555555);
		cnt1 = (cnt1 & 0x33333333) + ((cnt1 >>> 2) & 0x33333333);
		cnt2 = (cnt2 & 0x33333333) + ((cnt2 >>> 2) & 0x33333333);
		cnt1 += cnt2;
		cnt1 = (cnt1 & 0x0F0F0F0F) + ((cnt1 >>> 4) & 0x0F0F0F0F);
		cnt1 += cnt1 >>> 8;
		cnt1 += cnt1 >>> 16;
		return cnt1 & 0x000000FF;
	}
95988
def count(self):
        
        return functools.reduce(lambda x, y: x * y, (x.count for x in self.bounds))
637905
def count(self, strg, case_sensitive=False, *args, **kwargs):
    
    if not case_sensitive:
        return [word.lower() for word in self].count(strg.lower(), *args,
                **kwargs)
    return self._collection.count(strg, *args, **kwargs)
1193869
def count(self, Class, set=None, recursive=True,  ignore=True, node=None):
        
        return sum(1 for i in self.select(Class,set,recursive,ignore,node) )
303646
def count(self):
        """"""
        if self._total_count is None:
            self._total_count = self._get_total_count()
        return self._total_count
654494
def count(self, item):
        """"""
        if not isinstance(item, str):
            return 0
        count = 0
        for entry in self:
            if item.lower() == entry.lower():
                count += 1
        return count
184686
public double getCount(A first, B second) {
    if (counts.containsKey(first) && counts.get(first).containsKey(second)) {
      return counts.get(first).get(second);
    }
    return 0.0;
  }
1005034
def count(self):
        """"""
        if self._primary_keys is None:
            return self.queryset.count()
        else:
            return len(self.pks)
68012
def count(self, *args, **kw):
        
        obj = args[0]
        if self.method_name in obj._memo:
            self.hit = self.hit + 1
        else:
            self.miss = self.miss + 1
340446
def countBy(self, val):
        

        def by(result, key, value):
            if key not in result:
                result[key] = 0
            result[key] += 1

        res = self._group(self.obj, val, by)

        return self._wrap(res)
1219069
def count(self, value):
        
        cnt = 0
        for x in self:
            if x == value:
                cnt += 1
        return cnt
904146
def count(self, key):
        """"""
        count = 0
        pos = self.index(key, -1)
        if pos == -1:
            return count
        count += 1
        for i in range(pos+1, len(self)):
            if self[i][0] != key:
                break
            count += 1
        return count
1073960
public static int countOccurrencesOf(String str, String sub) {
        if (str == null || sub == null || str.length() == 0 || sub.length() == 0) {
            return 0;
        }
        int count = 0;
        int pos = 0;
        int idx;
        while ((idx = str.indexOf(sub, pos)) != -1) {
            ++count;
            pos = idx + sub.length();
        }
        return count;
    }
419874
def count(self):
        
        result = 0
        bits = self._bits
        while bits:
            result += bits % 2
            bits >>= 1
        return result
691231
function count(predicate) {
  predicate = typeof predicate === 'function' ? predicate : util.defaultPredicate;

  let c = 0;

  for (let item of this) {
    if (predicate(item)) c++;
  }

  return c;
}
926148
public int getCount(T x, T y) {
        // REMINDER: check for indexing?
        return counts.get(getIndex(x, y));
    }
1130434
def Then2(self, f, arg1, *args, **kwargs):
        
        args = (arg1,) + args
        return self.ThenAt(2, f, *args, **kwargs)