copy of jswordcounter