Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Counts all elements in an array or in a Countable object
Alias sizeof
<?php count(Countable|array $value, int $mode = COUNT_NORMAL): int
<?php         return resolve([]);

    }



    $len = \count($promisesOrValues);



    if ($len < $howMany) {

        return reject(
<?php     $cancellationQueue = new Internal\CancellationQueue();



    return new Promise(function ($resolve, $reject) use ($promisesOrValues, $mapFunc, $cancellationQueue): void {

        $toResolve = \count($promisesOrValues);

        $values    = [];



        foreach ($promisesOrValues as $i => $promiseOrValue) {
<?php     $cancellationQueue = new Internal\CancellationQueue();



    return new Promise(function ($resolve, $reject) use ($promisesOrValues, $reduceFunc, $initialValue, $cancellationQueue): void {

        $total = \count($promisesOrValues);

        $i = 0;



        $wrappedReduceFunc = function ($current, $val) use ($reduceFunc, $cancellationQueue, $total, &$i): PromiseInterface {