I'm not sure about this function, but if you want to know how many items are in stack, you can use:
Lua Code:
local icon, stackCount, sellPrice, meetsUsageRequirement, locked, equipType, itemStyle, quality = GetItemInfo(bagId, slotIndex)
EDIT:
Also what can be useful is inventory manager. You are working with bank so:
Lua Code:
local item = PLAYER_INVETORY:GetBankItem(slotIndex)
It will give you a table with the following keys:
item.bagId
item.equipType
item.filterData
item.iconFile
item.inventory
item.isJunk
item.itemInstanceId
item.locked
item.meetsUsageRequirement
item.quality
item.searchData
item.sellPrice
item.slotIndex
item.slotType
item.stackCount
item.stackSellPrice
item.statValue