Assuming you create the table on START, the on INPUT event can be reduced to

Code:
On *:input:*:{
  if /* iswm $1 { return }
  hinc wordcount $*
}