From ESOUI Wiki
This function returns the size of the item stack in a bag slot, and the maximum size that that stack can have.
- A number representing the bag to check; it must be one of the built-in Bag values.
- The numeric index of the slot in that bag which should be checked. For most bags, this is a number ranging from 1 to the size of the bag.
- The number of items in the stack.
- The maximum amount of this item that can be stacked in this bag slot.
local size, max = GetSlotStackSize(bag, slot)
- The Craft Bag doesn't honor the maximum stack size. In the inventory, materials generally have a maximum stack size of 200, but the Craft Bag can stack items well into the thousands. Calling this function on a Craft Bag slot will still identify 200 as the maximum stack size.