Get total count of groups.
172799
protected function getGroupsCount() {
    // There is no unpublished option for groups.
    $query = $this->connection->select('groups', 'g');
    $query->addExpression('COUNT(*)');
    return $query->execute()->fetchField();
  }
499787
public static int countByG_K_T(long groupId, String key, int type) {
		return getPersistence().countByG_K_T(groupId, key, type);
	}
1154933
def totals(self):
        
        def agg(d):
            keys = ['g','a','p','pm','pn','pim','s','ab','ms','ht','gv','tk','bs']
            res = { k: 0 for k in keys }
            res['fo'] = { 'won': 0, 'total': 0 }
            for _, v in d.items():
                for k in keys:
                    res[k] += v[k]
                for fi in res['fo'].keys():
                    res['fo'][fi] += v['fo'][fi]
            return res
            
        return self.__apply_to_both(agg)
943659
def count(self):
        
        total = len(self.children)
        for child in self.children:
            total += child.count()
        return total
487209
def datasets_org_count(self):
        """"""
        from udata.models import Dataset  # Circular imports.
        return sum(Dataset.objects(organization=org).visible().count()
                   for org in self.organizations)
1341715
def ngroups(self):
        """"""
        if self._can_use_new_school():
            return self._grouped_spark_sql.count()
        self._prep_pandas_groupby()
        return self._mergedRDD.count()
1270558
def count(self):
        """"""
        if self.request["Select"] == "COUNT":
            while not self.exhausted:
                next(self, None)
        return self._count
359048
def reqAccountSummary(self, reqId, groupName, tags):
        """"""
        return _swigibpy.EClientSocketBase_reqAccountSummary(self, reqId, groupName, tags)
559196
def groups_names(self):
        
        return _ListProxy(self._get_group_name_by_num(i) for i in range(self.groups_count))
773843
def grouped_count_sizes(fileslist, fgrouped):  # pragma: no cover
    ''''''
    fsizes = {}
    total_files = 0
    allitems = None
    if isinstance(fgrouped, dict):
        allitems = fgrouped.iteritems()
    elif isinstance(fgrouped, list):
        allitems = enumerate(fgrouped)
    for fkey, cluster in allitems:
        fsizes[fkey] = []
        for subcluster in cluster:
            tot = 0
            if subcluster is not None:
                for fname in subcluster:
                    tot += fileslist[fname]
                    total_files += 1
            fsizes[fkey].append(tot)
    return fsizes, total_files
494071
public int getThreadCount(ThreadGroup group, Status... s) {
        Thread[] threads = getThreads(group);
        int count = 0;
        for (Thread t : threads) {
            if (t instanceof MonitoredThread) {
                Status status = getStatus((MonitoredThread) t);
                if (status != null) {
                    for (Status x : s) {
                        if (x == status) {
                            count++;
                        }
                    }
                }
            }
        }
        return count;
    }
1155629
def get_ngroups(self, field=None):
        '''
        
        '''
        field = field if field else self._determine_group_field(field)
        if 'ngroups' in self.data['grouped'][field]:
            return self.data['grouped'][field]['ngroups']
        raise ValueError("ngroups not found in response. specify group.ngroups in the query.")
759042
def getCountLT(self, item):
        """"""
        index = bisect.bisect_left(self._list, item)
        return index
829924
def getCountGT(self, item):
        """"""
        index = bisect.bisect_right(self._list, item)
        return len(self._list) - index
395075
def missing_count(self):
        """"""
        if self.means:
            return self.means.missing_count
        return self._cube_dict["result"].get("missing", 0)
487122
public int getObjectCount(int groupID) {
		if (groupID >= 0 && groupID < objectGroups.size()) {
			ObjectGroup grp = (ObjectGroup) objectGroups.get(groupID);
			return grp.objects.size();
		}
		return -1;
	}
435220
def get_groups(self, limit=100, offset=0):
        
        url = self.TEAM_GROUPS_URL + "?limit=%s&offset=%s" % (limit, offset)

        connection = Connection(self.token)
        connection.set_url(self.production, url)

        return connection.get_request()