Eno\ListElement » length

length() → number

Returns the count of items in the list.

enocolors:
- pink
- peach
php$list = Parser::parse($input)->element('colors');

$list->length();  // returns 2

Return value

The number of items in the list as a number.