Given an array of n words. Some words are repeated twice, we need to count such words.
Examples:
Input : s[] = {"hate", "love", "peace", "love",
"peace", "hate", "love", "peace",
"love", "peace"};
Output : 1
There is only one word "hate" that appears twice
Count words that appear exactly two times in an array of words: https://www.geeksforgeeks.org/count-words-appear-exactly-two-times-array-words/