That could work. This is what Wykkyd had originally come up with for the count:
Code:
local useIcon = _addon:GetOrDefault( true, _addon.Settings["soulgem_icon"] )
local retVal, c = "", {215/255,213/255,205/255,1}
local name, icon, icon2, stackCount = "", "", "", 0
local myLevel = GetUnitEffectiveLevel("player")
local emptyCount, fullCount = 0, 0
name, icon, stackCount = GetSoulGemInfo(SOUL_GEM_TYPE_EMPTY, myLevel, true); emptyCount = stackCount;
name, icon2, stackCount = GetSoulGemInfo(SOUL_GEM_TYPE_FILLED, myLevel, true); fullCount = stackCount;
It's not using slot references, but I'm not against reworking things.