Added word analysis implementation for counting words