for each order there is a number of orderLineItems are present.For each order and items we need to assign a increment value.if the previous item value is equal to current item value.there is no need to increment just pass the value.otherwise increment value is assign to item element.
Here is the points we should consider:
1)There is number of orders are present.
2)for each order there is number of orderLineitems are there.
3)we have to assign a sequence number to each iteration but there is a condition is present like(Conditional increment)
if the previous item value is equal to current item value.no need to increase sequence number just pass the item value.if it is not equal just increase sequence number and assign to item.