import collections
import operator


def dnsbl_hit_count(log_data):
    """Counts how many hosts were found in each dnsbl."""

    y = collections.defaultdict(int)
    for v in log_data.values():
        for bl in v:
            y[bl] += 1
    return sorted(y.items(), key=operator.itemgetter(1), reverse=True)