Prism · Sugar
$count
Counts the elements of a list. Shorthand for a $reduce that adds one for each.
{
items: ['apple', 'banana', 'cherry', 'date', 'elderberry'],
}{ $count: { over: { $ref: '$.items' } } }5
Runs in this page on the installed package. The input and the expected output are defined by the example.