Fix ItemStack comparison being too strict and counting the number of items in the stack.