code: public static Map<String, Long> buildCountMap(Pattern pattern,
              String text) {
          return buildCountMap(pattern.splitAsStream(text));
      }
docs: Build count map map.
  
  @param pattern the pattern
  @param text    the text
  @return the map