code: private void countKey(Map<String, Integer> map, String key, int count) {
  		if (map.containsKey(key)) {
  			map.put(key, map.get(key) + count);
  		} else {
  			map.put(key, count);
  		}
  	}
docs: Helper method that stores in a hash map how often a certain key occurs.
  If the key has not been encountered yet, a new entry is created for it in
  the map. Otherwise the existing value for the key is incremented.
  
  @param map
  the map where the counts are stored
  @param key
  the key to be counted
  @param count
  value by which the count should be incremented; 1 is the usual
  case