Supported Versions: PHP 7 >= 7.3.0, PHP 8
Verify that the contents of a variable is a countable value
<?php is_countable(mixed $value): bool
<?php     public static function plural($value, $count = 2)

    {

        if (is_countable($count)) {

            $count = count($count);

        }
<?php         if (is_countable($number)) {

            $number = count($number);

        }
<?php             return false;

        } elseif (is_string($value) && trim($value) === '') {

            return false;

        } elseif (is_countable($value) && count($value) < 1) {

            return false;

        } elseif ($value instanceof File) {

            return (string) $value->getPath() !== '';
<?php     public function addLoop($data)

    {

        $length = is_countable($data) && ! $data instanceof LazyCollection

                            ? count($data)

                            : null;