The issue seems quite simple but the question is which associations between entities you use and how.
One of the simplest ways would be to use a microflow with a decision object ("if the shopping cart contains a product increase the number of products") .
Or even simpler in a microflow to always add the number of items - if it is 0 then the proper number of products will be added.
It all depends on the logic you have in use for now, but if you are using an entity that contains the number of products and is an association between the shopping cart and the number of products then the case is already simple