Compute cardinality / sequence size of expression. For array expressions,
    the count is excluding nulls. For tables, it's the size of the entire
    table.

    Returns
    -------
    counts : int64 type
327611
def count(expr, where=None):
    
    op = expr.op()
    if isinstance(op, ops.DistinctColumn):
        result = ops.CountDistinct(op.args[0], where).to_expr()
    else:
        result = ops.Count(expr, where).to_expr()

    return result.name('count')
736140
def GetNumberOfRows(self):
    
    if not self._database_object:
      raise IOError('Not opened.')

    if self._number_of_rows is None:
      self._number_of_rows = self._database_object.GetNumberOfRows(
          self._table_name)

    return self._number_of_rows
409324
public long cardinality() {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return jedis.zcard(getKey());
            }
        });
    }
772521
private int getByteCount(ArrayList<byte[]> listOfByteArrays) {
        int count = 0;
        for (byte[] byteArray : listOfByteArrays) {
            if (byteArray != null) {
                count += byteArray.length;
            }
        }
        return count;
    }
439672
def state_size(self) -> Sequence[Sequence[int]]:
        '''
        '''
        fluents = self.domain.state_fluents
        ordering = self.domain.state_fluent_ordering
        return self._fluent_size(fluents, ordering)
973587
private int getSizeOfIntArrays() {
    return (offsets.length + hashcodes.length + nexts.length + counts.length +
        indexStrides.length) * 4;
  }
228756
def count(self):
        
        if self._result_cache is not None and not self._iter:
            return len(self._result_cache)

        return self.query.get_count()
889596
def cardinality(self):
		'''
			
		'''
		num_strings = {}
		def get_num_strings(state):
			# Many FSMs have at least one oblivion state
			if self.islive(state):
				if state in num_strings:
					if num_strings[state] is None: # "computing..."
						# Recursion! There are infinitely many strings recognised
						raise OverflowError(state)
					return num_strings[state]
				num_strings[state] = None # i.e. "computing..."

				n = 0
				if state in self.finals:
					n += 1
				if state in self.map:
					for symbol in self.map[state]:
						n += get_num_strings(self.map[state][symbol])
				num_strings[state] = n

			else:
				# Dead state
				num_strings[state] = 0

			return num_strings[state]

		return get_num_strings(self.initial)
191637
def total_count(self, seqs, nreport=100, scan_rc=True):
        
        
        count_table = [counts for counts in self.count(seqs, nreport, scan_rc)]
        return np.sum(np.array(count_table), 0)
1286617
protected void computeCardinality() {
    this.cardinality = 0;
    if (BufferUtil.isBackedBySimpleArray(bitmap)) {
      long[] b = this.bitmap.array();
      for (int k = 0; k < b.length; k++) {
        this.cardinality += Long.bitCount(b[k]);
      }
    } else {
      int m = this.bitmap.limit();
      for (int k = 0; k < m; k++) {
        this.cardinality += Long.bitCount(this.bitmap.get(k));
      }
    }
  }
968209
void countNonZeroInR( int[] parent ) {
        TriangularSolver_DSCC.postorder(parent,n,post,gwork);
        columnCounts.process(A,parent,post,countsR);
        nz_in_R = 0;
        for (int k = 0; k < n; k++) {
            nz_in_R += countsR[k];
        }
        if( nz_in_R < 0)
            throw new RuntimeException("Too many elements. Numerical overflow in R counts");
    }
1233342
def get_var_count(self):
        
        n = c_int()
        self.library.get_var_count.argtypes = [POINTER(c_int)]
        self.library.get_var_count(byref(n))
        return n.value
1272134
public int getCount(Object o) {
    int[] nums = (int[]) cset.get(o);   
    if (nums == null ) {
      return(0);
    }
    else {
      return(nums[0]);
    }
  }
1066417
def num_row(self):
        
        ret = ctypes.c_ulong()
        _check_call(_LIB.XGDMatrixNumRow(self.handle,
                                         ctypes.byref(ret)))
        return ret.value
906530
public static int count(Iterable seq) {
        if (seq instanceof Collection) {
            return ((Collection) seq).size();
        }
        int c = 0;
        Iterator it = seq.iterator();
        while (it.hasNext()) {
            c++;
            it.next();
        }
        return c;
    }
796425
public long cardinality() {
        switch(type) {
            case EMPTY:
                return 0/*by definition*/;
            case EXPLICIT:
                return explicitStorage.size();
            case SPARSE:
                return (long)Math.ceil(sparseProbabilisticAlgorithmCardinality());
            case FULL:
                return (long)Math.ceil(fullProbabilisticAlgorithmCardinality());
            default:
                throw new RuntimeException("Unsupported HLL type " + type);
        }
    }
1052791
def count(self):
        
        ids, _, ngroups = self.grouper.group_info
        val = self.obj.get_values()

        mask = (ids != -1) & ~isna(val)
        ids = ensure_platform_int(ids)
        minlength = ngroups or 0
        out = np.bincount(ids[mask], minlength=minlength)

        return Series(out,
                      index=self.grouper.result_index,
                      name=self._selection_name,
                      dtype='int64')