How to remove a certain amount of something from someone's inventory
You should be able to achieve it with clear by adding a maxCount
clear [player] [item] [data] [maxCount] [dataTag]
So it should be
/clear @p minecraft:iron_ingot -1 3
You should be able to achieve it with clear by adding a maxCount
clear [player] [item] [data] [maxCount] [dataTag]
So it should be
/clear @p minecraft:iron_ingot -1 3