Fixing algorithm that determines the # of an item that can be crafted

Ugh, took me long enough.