In a variable of $order->items I have the output below. I have removed the contents of the arrays to make it easier to view.
How can I count the arrays? The example would output 3.
I am unfamiliar with objects and protected elements.
Store\Model\Collection Object ( [items:protected] =>
Array (
[0] => Store\Model\OrderItem Object ( ... )
[1] => Store\Model\OrderItem Object ( ... )
[2] => Store\Model\OrderItem Object ( ... )
)