@@ -0,0 +1,1694 @@
+import java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.lang.Character;%0A%0Apublic class CountingDuplicates %7B%0A  public static int duplicateCount(String text) %7B%0A    HashMap%3CCharacter, Integer%3E duplicates = new HashMap%3CCharacter, Integer%3E();%0A    for (int i = 0; i%3C text.length(); i++)%7B%0A      Character symbol = Character.toLowerCase(text.charAt(i));%0A      Integer count = duplicates.get(symbol);%0A      if(count == null)%7B%0A        count = 0;%0A      %7D else %7B%0A        count = 1;%0A      %7D%0A      duplicates.put(symbol, count);%0A    %7D%0A    System.out.println(duplicates);%0A    int ans = 0;%0A    for(Map.Entry%3CCharacter, Integer%3E entry : duplicates.entrySet())%7B%0A      ans += entry.getValue();%0A    %7D%0A    return ans;%0A  %7D%0A%7D%0A%0Apublic class CountingDuplicates %7B%0A    public static int duplicateCount(String text) %7B%0A      HashMap%3CCharacter, Integer%3E map = new HashMap%3C%3E();%0A        for (char c : text.toLowerCase().toCharArray()) %7B%0A            map.put(c, map.containsKey(c) ? 1 : 0);%0A        %7D%0A      return (int) map.values().stream().filter(e -%3E e %3E 0).count();%0A    %7D%0A%7D%0A%0Aimport java.util.Map;%0Aimport static java.util.function.Function.identity;%0Aimport static java.util.stream.Collectors.counting;%0Aimport static java.util.stream.Collectors.groupingBy;%0A%0Aclass CountingDuplicates %7B%0A    private static Map%3CCharacter, Long%3E charFrequenciesMap(final String text) %7B%0A        return text.codePoints()%0A            .map(Character::toLowerCase)%0A            .mapToObj(c -%3E (char) c)%0A            .collect(groupingBy(identity(), counting()));%0A    %7D%0A    %0A    static int duplicateCount(final String text) %7B%0A        return (int) charFrequenciesMap(text).values().stream()%0A            .filter(i -%3E i %3E 1)%0A            .count();%0A    %7D%0A%7D%0A%0A

Create Counting_Duplicates.java