How do I do per-item shipping based on the number of products?
Pontus Nilsson has the right idea, just shared it as a comment instead of an answer?

I decided this was a good teachable moment (this also turned out to be a head scratcher at more than one turn), so below is the screencast of how to do this and a step-by-step:

https://www.youtube.com/watch?v=trLydGpimD4

STEP BY STEP


Install https://www.drupal.org/project/commerce_shipping and https://www.drupal.org/project/commerce_flat_rate
Create three different flat rates (I recommend you keep the "Title" different, but change the "Display Title" to be the same, so the rate change is transparent to the user)
Configure each flat rate component to have a condition on "Total product quantity comparison" so that only the appropriate rates show up based on number of products. Note this will only work if you use the standard line item type "Product" ... if you have custom line item types, you will have to create a component that does the comparison/counting that you need.
In order to count the number of eligible products, we will need to create a component rule that has a "line item" parameter and has an "number decimal" provided called "is_a_product".


This component simply needs to have a condition on entity bundle for "Product" and needs an action that "sets a data value" ... the is_a_product ... to the line-item:quantity.


Next, we will need to create a pricing rule for your first "Medium" level shipping price calculation. 

A. Once you discover where to create the shipping price calculation rule you will need to create two conditions: 


Entity has field (it should have the shipping service field)
Data Comparison (the shipping service field should equal the medium shipping service)


B. Now you will need to count the number of products. Let's add an action "create a variable" for an number decimal called "num_products"

C. Next you will need to loop over all the line items in the order.

D. Next you will add an action for the component you created in step 4.

E. Then you will need to "Calculate a value" by adding the "num_products" and the "is_a_product" (through some testing I confirmed the integer is zero by default) and then save the result by "setting a data value" and setting "num_products" to the result value

F. Finally, you will need to "Multiply the unit price by some amount" and select the num_products as the multiplier
Repeat step 5 for each breakdown of product quantity rate change