code: protected void updateMetricCounters(String metricName, Map<String, Integer> metricNameCounters) {
          if (metricNameCounters.containsKey(metricName)) {
              metricNameCounters.put(metricName, metricNameCounters.get(metricName) + 1);
          } else {
              metricNameCounters.put(metricName, 1);
          }
      }
docs: computes occurrences of specified metric name