select 
    order_num,
    count(order_num) as order_lines
from
    OrderItems
group by
    order_num    
order by
    order_lines;