yes but you could use it in a multi-board or leader board
CountNumberOfItemOnUnit
not ratedReturns the number of items of a certain item type the unit u has.
function CountNumberOfItemOnUnit takes integer itemid, unit u returns integer
local integer i = 0
local integer sum = 0
loop
exitwhen i > 5
if GetItemTypeId(UnitItemInSlot(u, i)) == itemid then
set sum = sum + 1
endif
set i = i + 1
endloop
return sum
endfunction