Help needed! Run code on item drop

So I'm trying to set up a variable to use for recording how many of an item drop when you kill a monster, but I can't seem to find an "if x drops do y" thing... Anyone know anything about this or similar? >~<"
What are you trying to achieve with the variable? I don't know offhand of a way to do that, but there might be another way to achieve what you're trying to ultimately do.

Original thread: https://forums.rpgmakerweb.com/threads/help-needed-run-code-on-item-drop.83478/