The number should show the total number of products contained in the purchase based on their individual price. This means all products with a single price, whether it's just an item or a pack.
In the example of the question, the three items C are not part of a pack, they have a unit price, so the total purchase number to show is seven. It would only be five if the three C items are part of a pack with a single total price.
You must think exactly the same as if it were a real purchase:
- You buy two apples, a banana and a pear = 4 items
- You add three more pears = 7 items
- But then you discover there's a tray of four pears at a better price, you remove the individual pears and buy the pack. You have two apples, a banana, and a pack, regardless of its content = 4