API GetNumLootItems

Returns the slot number of the last item in the loot window (the item window must be opened). So it may be more than the number of items remaining, if one or more items have already been taken.

numLootItems = GetNumLootItems;

Returns

 * numLootItems : - The slot number of the last item in the loot window.