Suggestion: `internalGetCounter`'s pattern is a bit more concise, i.e.:

    AtomicLong value = counters.put(key, new AtomicLong(0));

    return value == null ? 0 : value.get();