def count_files_per_issue(aggregated):
    """Count the number of files for each issue.

    :param aggregated: {issue: [file, ...], ...}

    >>> i = count_files_per_issue(dict((('TEST-1111', ('A', 'B', 'C')), ('TEST-1112', ('A', 'D')))))
    >>> i.sort()
    >>> i
    [('TEST-1111', 3), ('TEST-1112', 2)]
    """
    return [(key, len(v)) for key, v in aggregated.items()]