Count order statuses without storing each group
countBy
Map.merge
array_count_values
collections.Counter