Verification process between items

Okay so basically I am making a game which is BTC mining simulator and I have came to an issue where the for i,v in pairs loop gets the cards extra bonus value and if they have many of the same items and it will still add to that thing, so is there any way to make the verification process like 1 2 3 values and it searches by those too and it will not add to that…