Limit items in a loot-table

I am making a datapack, where I want to limit the number of items generated in chests to 3. How do I do that?
Continue to help post