word-count application implemented in three