Increments the counter for the given *kwargs*.

        The counter index is computed from *kwargs*.

        *kwargs* is an optional dict of vars captured by the
        :class:`filter.Filter` that match the log entry. An immutable version
        of *kwargs* is used as an index to keep track of several counters for
        the same :class:`rule.Rule`. It can be `None`.

        Returns the index of the updated counter.

def increment(self, kwargs):
        """
        Increments the counter for the given *kwargs*.

        The counter index is computed from *kwargs*.

        *kwargs* is an optional dict of vars captured by the
        :class:`filter.Filter` that match the log entry. An immutable version
        of *kwargs* is used as an index to keep track of several counters for
        the same :class:`rule.Rule`. It can be `None`.

        Returns the index of the updated counter.
        """
        index = None

        if kwargs:
            # index = hash(tuple(sorted(kwargs.items())))
            # Better keep something readable so we can output it.
            index = tuple(sorted(kwargs.items()))

        self[index] += 1

        return index