Capco Interview Question

Implement method to count repeated words in String