I made InventoryController.refreshProducts() automatically reset the count. Under the current system, the count cannot be kept accurate, since it depends on both the product and the product container. I also eliminated some duplicate code to ensure this gets used when it needs to. Now count works correctly.