You could replace:

noop $com(%a,Count,3)
if ($com(%a).result)

with:

if ($comval(%a,0))


Gone.