Rewrote wordcount using countby