$collection->count()

Counts all elements in the array

  • return (int)

Examples:

This collection has
<?= $collection->count() ?>
items