Karlie here from the Shopify Support Team! You have a couple of options when it comes to setting up a product limit like the one you're looking for. You could either set up some bundles manually within your Shopify Admin, you could use an app or even create a discount code.
To create a product bundle within your Shopify Admin, you would simply just create a product and the title could be, "4 for $5" - the description could say something along the lines of "Buy 4 of this product and pay a discounted amount of 5$" and you would just adjust your product images to have 4 of that product in the image as well as adjust the inventory.
If you're looking to use an app, then you could look into a product bundling app like; Bundle Products and Discounts, Bundler - Product Bundles, and Bold Bundles. These apps would allow you to upsell by either offering a product bundle (so you could do 4 items for 5$) or by creating a customized discount.
You could also try creating a discount code from within your Shopify Admin. If you were to create a discount code by the fixed amount then you could use this guide and make sure your 'Minimum Requirements' are set to '4' and then you can set your discount value to whatever you'd like to offer the customer.
I hope this has answered your question. If not, or if you have any further questions please let me know. I will be happy to help!