Item amount as damage?

I couldnt figure out how to use an amount of items to increase ATK... I wanted it so that your ATK increases for each item X that you have
Use this in your damage formula, where id is replaced by the item id you wish to use (no leading zeros):

Code:
$gameParty.numItems($dataItems[id])

Keep in mind it could be 0.

And if you want to use armors or weaspons instead, use $dataArmors and $dataWeapons rather than $dataItems.
@Nectar, @Shaz, you just gave me super crazy idea to improve gameplay in my project, thanks 😀

Original thread: https://forums.rpgmakerweb.com/threads/item-amount-as-damage.115758/