completed wordcount functions
completed functions for mimic.py