This small script searches given string for duplicates and gives array of words that were duplicated as well as the count of each duplicated word.