function Tally overload(v as string,n as string) as integer
    if v="" or n="" then return -2
    dim as integer result=0
    do
         dim as integer mk=instr(mk+1,v,n)
         if mk then result+=1
    loop until instr(v,n)=0
    return 0
end function

function Tally overload(v as byte,n as string) as integer
    return Tally(str(v),n)
end function