def count(items: list) -> list:
    """
    Generate a list of counts for each item in the input list. Outputs with highest counted item at index 0

    Args:
        items (list): A list of objects to be sorted

    Returns:
        list: A list of unique items in the input and the number of occurances for each item
    """
    def row2(k):
        return k[1]
    if isinstance(items[0], list):
        items = [tuple(x) for x in items]
    uniqs = [[x, items.count(x)] for x in set(items)]
    uniqs.sort(key=row2, reverse=True)
    return uniqs