Get the total count (over all data instances) of each feature

@return an array containing the counts (indexed by index)
176614
public float[] getFeatureCounts() {
    float[] counts = new float[featureIndex.size()];
    for (int i = 0, m = size; i < m; i++) {
      for (int j = 0, n = data[i].length; j < n; j++) {
        counts[data[i][j]] += 1.0;
      }
    }
    return counts;
  }
522535
protected function objectCount()
    {
        $topNodeArray = eZPersistentObject::fetchObjectList(
            eZContentObjectTreeNode::definition(),
            null,
            array( 'parent_node_id' => 1, 'depth' => 1 )
        );
        $subTreeCount = 0;
        foreach ( array_keys ( $topNodeArray ) as $key  )
        {
            $subTreeCount += $topNodeArray[$key]->subTreeCount( array( 'Limitation' => array(), 'MainNodeOnly' => true ) );
        }

        return $subTreeCount;
    }
730743
public function count()
    {
        if ($this->cnt === null) {
            $this->cnt = $this->getDataSource()->count();
        }
        return $this->cnt;
    }
871907
public int getIgnoredCount() {
    int count = 0;
    for (AggregatedTestResultEvent t : getTests()) {
      if (t.getStatus() == TestStatus.IGNORED ||
          t.getStatus() == TestStatus.IGNORED_ASSUMPTION) {
        count++;
      }
    }
    return count;
  }
772690
public int getStatementCount() {
        int ret = 0;
        for (final StatementGroup sg : statementGroups) {
            ret += sg.getAllStatements().size();
        }
        return ret;
    }
313655
List<Long> getCountList() {
		List<Long> ret = new ArrayList<Long>();
		long lastValue = 0;
		int positionInBlock = 0;
		for (long index = 0; index < this.bitVector.size(); index++) {
			if (this.bitVector.getBit(index)) {
				lastValue++;
			}
			positionInBlock++;
			if (positionInBlock == this.blockSize) {
				ret.add(lastValue);
				positionInBlock = 0;
			}
		}
		if (positionInBlock > 0) {
			ret.add(lastValue);
		}
		return ret;
	}
354611
public function count()
    {
        if ($this->count === null) {
            if ($this->dataSource instanceof \Countable) {
                $this->count = $this->dataSource->count();
            } elseif (is_array($this->dataSource)) {
                $this->count = count($this->dataSource);
            } else {
                throw new Exception\RuntimeException(sprintf(
                    'DataSource with type "%s" cannot be counted',
                    gettype($this->dataSource)
                ));
            }
        }
        return $this->count;
    }
1364922
public int getCount(T obj) {
        int objIndex = (allowNewIndices) 
            ? objectIndices.index(obj)
            : objectIndices.find(obj);
        return (objIndex < 0) ? 0 : indexToCount.get(objIndex);
    }
1188726
public function count()
    {
        $traversable = $this->optimizeUnwrap();

        if (is_array($traversable)) {
            return count($traversable);
        }

        return iterator_count($traversable);
    }
105284
public function count()
	{
		$count = count($this->jar);
		if ($this->parentEnabled)
		{
			$count += $this->parent->count();
		}
		return $count;
	}
814086
@InterfaceAudience.Public
    public int getTotalRows() {
        try {
            updateIndex();
        } catch (CouchbaseLiteException e) {
            Log.e(Log.TAG_VIEW, "Update index failed when getting the total rows", e);
        }
        return getCurrentTotalRows();
    }
409359
public java.util.List<InstanceCount> getInstanceCounts() {
        if (instanceCounts == null) {
            instanceCounts = new com.amazonaws.internal.SdkInternalList<InstanceCount>();
        }
        return instanceCounts;
    }
862697
public function total() : array
    {
        $stats = $this->generate();

        return [
            'Total',
            $stats->sum('number_of_classes'),
            $stats->sum('methods'),
            round($stats->avg('methods_per_class'), 2),
            $stats->sum('lines'),
            $stats->sum('loc'),
            round($stats->avg('loc_per_method'), 2),
        ];
    }
1267989
public function count()
    {
        $limit = $this->_limit;
        $offset = $this->_offset;
        $this->limit(0);

        $joins = $this->getJoins();
        $copyJoins = clone($joins);
        
        $keys = array_keys($copyJoins->getArrayCopy());
        foreach ($keys as $key) {
            $joins[$key]['fields'] = array();
        }

        $this->_joins = $joins;

        $fields = $this->_fields;
        $this->_fields = array('COUNT(*) AS totalRows');
        $prefix = $this->_prefixTableName;
        $this->_prefixTableName = false;

        $result = $this->all();

        $this->_prefixTableName = $prefix;
        $this->_fields = $fields;
        $this->_joins = $copyJoins; 
        $this->_limit  = $limit;
        $this->_offset = $offset;
        return (isset($result[0]['totalRows'])) ? $result[0]['totalRows'] : 0;
    }
1352785
public function count()
	{
		$count = 0;

		for ($index = 0, $length = strlen($this->data); $index < $length; $index++)
		{
			$count += self::$count[ord($this->data[$index])];
		}

		return $count;
	}
1288147
public function get_total_responses_count() {
        global $DB;
        if ($this->grandtotal === null) {
            $this->grandtotal = $DB->count_records_sql($this->countsql, $this->countparams);
        }
        return $this->grandtotal;
    }
644622
public int getNrSelectedFeatures() {
		int count = 0;
		for (VectorLayer layer : getVectorLayers()) {
			count += layer.getSelectedFeatures().size();
		}
		return count;
	}