It is pretty easy, actually.
In order to setup shipping cost calculation as you described you should:
1. Go to Ecwid control panel -> System Settings -> Shipping and click "New Shipping zone" button.
2. Choose the zone for which this shipping method should be applied
3. Choose "Custom table"
in "How to calculate shipping" block and proceed to the next step
4. Choose "Table based on" value (Subtotal or Weight - parameter that will be used for setting ranges)
5. Choose "Range, subtotal, weight" in "Rate base on" selectbox
6. Enter weight/subtotal range for your shipping method and set $3 in "per order" field and $2 in "per item" field. Leave 0 in other ones.
7. Set delivery speed and shipping method name that will be shown to the custom
8. Save changes.
Once you do this, shipping cost will be calculated as $3 + $2 x number_of_items_in_cart.
If you have any questions, please, feel free to ask.