Here's a demo of the "Product Combi" - extension for Opencart.
2 products are activated in this category, T-shirts in different colours. Both products has the same Discount created, as shown here:
If you buy 3 assorted, you will obtain the Discount price for 3, and likewise for 5.
Feel free to add the products to the cart to see the discount change.