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                 $icls->setAmount(round($amount, 2));



                if (!empty($options['enableClassificationIds'])) {

                    $id = count($flattenedIncomeClassifications) + 1;

                    $icls->setId($id);

                }
<?php                         $ecls->setVatExemptionCategory($exemption);



                        if (!empty($options['enableClassificationIds'])) {

                            $id = count($flattenedExpensesClassifications) + 1;

                            $ecls->setId($id);

                        }
<?php             $response = $response->make();

        }

        

        $response->set('index', count($this->responses) + 1);

        $this->responses[] = $response;

    }
<?php     public function hasErrors(): bool

    {

        return !is_null($this->getErrors()) && count($this->getErrors()) > 0;

    }
<?php     public function count(): int

    {

        return count($this->attributes[$this->childKey] ?? []);

    }
<?php     public function count(): int

    {

        return count($this->attributes);

    }

    
<?php         $this->assertCount(6, $rows);

        $this->assertCount(5, array_filter($invoice->getInvoiceDetails(), fn($row) => $row->getRecType() === RecType::TYPE_5));



        for ($i = 0; $i < count($rows); $i++) {

            $this->assertEquals($i + 1, $rows[$i]->getLineNumber());

        }

    }
<?php         $this->assertCount(1, $notVat195Rows);

        $this->assertEquals(50, array_reduce($notVat195Rows, fn($carry, $row) => $carry + $row->getNetValue(), 0));



        for ($i = 0; $i < count($rows); $i++) {

            $this->assertEquals($i + 1, $rows[$i]->getLineNumber());

        }

    }
<?php     public function count(): int

    {

        return count($this->xml);

    }



    public function __get($name)