title: Count Words Appear Exactly Two Times Array Words
signature: func countWordsAppearExactlyTwoTimesArrayWords(stri []string, n int) int {
source_py: def count_words_appear_exactly_two_times_array_words(stri, n):
      m = dict()
      for i in range(n):
          m[stri[i]] = (m.get(stri[i], 0) + 1)
      res = 0
      for i in m.values():
          if (i == 2):
              res += 1
      return res
source_cpp: int count_words_appear_exactly_two_times_array_words(vector<string> str, int n) {
    unordered_map < string, int > m;
    for ( int i = 0;
    i < n;
    i ++ ) m [ str [ i ] ] += 1;
    int res = 0;
    for ( auto it = m . begin ( );
    it != m . end ( );
    it ++ ) if ( ( it -> second == 2 ) ) res ++;
    return res;
  }