'Gets a counter based on a key, creates a new one if it does not exist.
:param key: name of the metric
:type key: C{str}
:return: L{Counter}'

def counter(self, key):

    if (key not in self._counters):
        self._counters[key] = Counter()
    return self._counters[key]
