Returns number of entries within an index.
@access		public
@param		string			$key			Index Key
@param		string			$value			Value of Index
@return		integer			Number of entries within this index
778075
public function countByIndex( $key, $value ){
		$conditions	= array( $key => $value );
		return $this->table->count( $conditions );
	}
768360
public function lpush($collection, $key, $value) {

        $list = $this->getKey($collection, $key, []);

        array_unshift($list, $value);

        $this->setKey($collection, $key, $list);

        return count($list);
    }
122362
public static function int($value): int
    {
        $cleaned = preg_replace('#[^0-9-+.,]#', '', $value);
        preg_match('#[-+]?[\d]+#', $cleaned, $matches);
        $result = $matches[0] ?? 0;

        return (int)$result;
    }
26273
public function increment($key, $value = 1)
	{
		return $this->memcache->increment($this->prefix.$key, $value);
	}
1134051
public function lpush($key, $value) {

        $list = $this->get($key, array());

        array_unshift($list, $value);

        $this->set($key, $list);

        return count($list);
    }
877782
public static function indexOf(array $array, string $value, ?string $key = null)
    {
        foreach ($array as $index => $item) {
            if ($key !== null) {
                if (is_object($item)) {
                    $checkValue = isset($item->{$key}) ? $item->{$key} : null;
                } else {
                    $checkValue = isset($item[$key]) ? $item[$key] : null;
                }
            } else {
                $checkValue = $item;
            }
            if ($checkValue !== null && $checkValue === $value) {
                return $index;
            }
        }
        return -1;
    }
119230
public function increment($key, $value = 1)
    {
        return $this->connection()->incrBy($this->prefix . $key, $value);
    }
439294
public static function getKeyIndex(): int
    {
        if (self::$keyIndex == PHP_INT_MAX) {
            self::$keyIndex = 0;
        } else {
            self::$keyIndex++;
        }

        return self::$keyIndex;
    }
3728
private function sizeOf($value): int
    {
        if (is_string($value)) {
            return strlen($value);
        } elseif (is_array($value) || $value instanceof \Countable) {
            return count($value);
        }

        $traversable = $this->traversable($value);
        $key         = $traversable->key();
        $count       = iterator_count($traversable);
        // rewinds traversable to previous key to not change state of traversable
        // because iterator_count() changes the pointer
        $traversable->rewind();
        while ($traversable->valid() && $key !== $traversable->key()) {
            $traversable->next();
        }

        return $count;
    }
1041853
public static function get($key, $value = null)
    {
        if (array_has(static::$register, $key)) {
            return static::$register[$key];
        } else {
            static::set($key, $value);

            return $value;
        }
    }
841127
public function filter(string $value) : int
    {
        return $this->getParser()->parse($this->getLexer()->tokenize($value));
    }
1299857
function _reindexFiles($value, $key)
    {
        if (!is_array($value)) {
            return array($key => $value);
        } else {
            $ret = array();
            foreach ($value as $k => $v) {
                $ret[$k] = $this->_reindexFiles($v, $key);
            }
            return $ret;
        }
    }
314677
public function getInt($key)
    {
        if (isset($this->store[$key])) {
            return (int) filter_var($this->store[$key], FILTER_SANITIZE_NUMBER_INT);
        }

        return (int) filter_input(INPUT_COOKIE, $key, FILTER_SANITIZE_NUMBER_INT);
    }
627849
public function input($key, $value = null)
    {
        if (is_null($value)) {
            return Arr::get($this->inputs, $key);
        }

        return Arr::set($this->inputs, $key, $value);
    }
816967
public function increment($key, $value = 1)
    {
        $item = $this->getItem($key);
        if ($item === false) {
            $set_result = $this->set($key, $value);
            if ($set_result === false) return false;
            return $value;
        }

        $check_expire = $this->checkExpire($item);
        if ($check_expire === false) return false;

        $item['data'] += $value;

        $result = $this->setItem($key, $item['data'], $item['time'], $item['expire']);
        if ($result === false) return false;

        return $item['data'];
    }
589314
public function getCount($key)
	{
		$key = strtolower($key);
		
		if(array_key_exists($key, $this->data))
		{
			if(is_array($this->data[$key]))
			{
				return count($this->data[$key]);
			}
			
			return 1;
		}
		
		return 0;
	}
340694
public function countValue($value)
    {
        return count(array_filter($this->data, function ($item) use ($value) {
            return $value === $item;
        }));
    }