Format a top.

def format_top(counter, top=3):
    """ Format a top.
    """
    items = islice(reversed(sorted(counter.iteritems(), key=lambda x: x[1])), 0, top)
    return u'; '.join(u'{g} ({nb})'.format(g=g, nb=nb) for g, nb in items)