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         $object = @ftp_raw($this->connection(), 'STAT ' . $location);



        if (empty($object) || count($object) < 3 || substr($object[1], 0, 5) === "ftpd:") {

            throw UnableToRetrieveMetadata::create($path, $type, error_get_last()['message'] ?? '');

        }
<?php         $item = preg_replace('#\s+#', ' ', trim($item), 3);

        $parts = explode(' ', $item, 4);



        if (count($parts) !== 4) {

            throw new InvalidListResponseReceived("Metadata can't be parsed from item '$item' , not enough parts.");

        }
<?php         $item = preg_replace('#\s+#', ' ', trim($item), 7);

        $parts = explode(' ', $item, 9);



        if (count($parts) !== 9) {

            throw new InvalidListResponseReceived("Metadata can't be parsed from item '$item' , not enough parts.");

        }