Make public bool CheckItemBackpack(Mobile m, Item item, int amount) Function
You need to count all of the items in m's Backpack and count item's amount.
After that, return true or false with checking amounts of item with amount value.
Like this lines, you can add some code.
if (...