Silly javascript word counter, mainly as a learning tool