when you have a mix of physical and digital goods, you need to create a column in your cart to differentiate them.
Create a new cart column named ProdType.
In the add to cart button, set the ProdType column to 1 for physical items and 0 for digital items.
Now, set up 3 different shipping rules for each of the 3 scenarios where shipping should be applied, for example the first rule will be set up like this:
Trigger:
Number of Items With a Specific Column Value:
If the total Number of items where 'ProdType' has a value of '1' is '>=' a value of '1'
AND
Number of Items With a Specific Column Value:
If the total Number of items where 'ProdType' has a value of '1' is '<=' a value of '3'
Calcualtion:
Flat rate fee of 4