Counts the number of marks

@param  mixed   $key The key or the event
@return integer The value of the count result
190521
public function count($key)
    {
        $key = $key instanceof UnitOfTimeInterface ? $this->prefixKey . $key->getKey() : $this->prefixTempKey . $key;

        return (int) $this->getRedisClient()->bitcount($key);
    }
1082438
protected function parseTransactionTimestamp($key)
    {
        $results = [];
        if (preg_match('/^:' . $key . ':(\d{6})/', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return $this->sanitizeTimestamp($results[1]);
        }

        return 0;
    }
1141079
public function count()
    {
        $rawKeys = array_keys($this->rawData);
        $typeKeys = array_keys($this->typeData);
        $keys = array_merge($rawKeys, $typeKeys);
        $uniqueKeys = array_unique($keys);
        return count($uniqueKeys);
    }
856892
public int count(String key) {
        ConcurrentMap<WebSocketConnection, WebSocketConnection> bag = registry.get(key);
        return null == bag ? 0 : bag.size();
    }
1289224
public function search($key): ?int
    {
        $id = $this->getKeyword($key)->searchIn($this->items);

        if (false === $id) {
            return null;
        }

        return $id;
    }
1315656
public function count(): int
    {
        $amount = 0;
        // iterate with $key so the key consumer from peek() can have a look
        foreach ($this->elements as $key => $element) {
            $amount++;
        }

        return $amount;
    }
1128889
public function isEmpty($key = null) {
        if (is_null($key)) {
            return count($this->__attributes) == 0;
        }
        return !$this->has($key) || empty($this->__attributes[$key]);
    }
383366
public function getCount($primaryKey)
    {
        if (!isset($this->values[$primaryKey])) {
            throw new OutOfBoundsException(sprintf(
                'The key "%s" does not exist.',
                $primaryKey
            ));
        }

        return count($this->values[$primaryKey]);
    }
942226
public function delete($key) {
        $used_key = $this->getUsedKey($key);
        return ($this->redis->delete($used_key) > 0);
    }
216085
function group($key = null)
    {
        if (empty($key)) $key = sizeof($this->children);
        if (!isset($this->children[$key])){
            $this->children[$key] = new Trace($key, null);
        }
        return $this->children[$key];
    }
73341
public function count($key = null)
	{
		if (is_null($key)) {
			return count($this->params);
		}
		return count($this->getArray($key));
	}
238156
public function count(?string $key = null) : int
    {
        if (is_null($this->constructKey($key))) {
            return count($this->toArray());
        }

        $value = $this->get($key);

        if (!is_array($value)) {
            throw new InvalidArgumentException(
                'method count() should be called on array'
            );
        }

        return count($value);
    }
1338630
public function isFull($key)
    {
        if (!$this->hasTarget($key)) {
            throw new \RuntimeException("undefined key '$key'");
        }
        return $this->getCount($key) >= $this->getTarget($key);
    }
1034276
protected function findLine($key)
    {
        $parsedKey   = null;
        $parsedValue = null;

        foreach ($this->lines as $index => $line) {
            $parseOk = $this->parseEnvLine($line, $parsedKey, $parsedValue);
            if ($parseOk && $key === $parsedKey) {
                return $index;
            }
        }

        return -1;
    }
185912
function findKey( $key )
    {
        $num = $this->keyPick( $key );
        if ( $num >=0 and $num <= count( $this->Handlers ) )
        {
            $handler = $this->Handlers[$num];
            return $handler->findKey( $key );
        }
        $retValue = null;
        return $retValue;
    }
86353
public function increment($key, $offset=1) {
        $cacheKey = $this->buildKey($key);
        $ret = $this->getMemcache()->increment($cacheKey,$offset);
        if (!$ret) {
            $this->getMemcache()->set($cacheKey, 1);
            return 1;
        }
        return $ret;
    }
41403
public function sFlush($key) {
        $this->_redis->multi();
        $this->_redis->sMembers($key);
        $this->_redis->del($key);
        return $this->_redis->exec()[0];
    }