Code:
alias count.aliases {
  if (!$isfile($1)) return No such file: $1
  filter -ff $+(",$1,") nul alias *
  return $filtered
}


Naturally, this looks only at non-aliases files, as in those where aliases must be prefixed with the word "alias".


Gone.