def part1(data):
    """
    Each digit of a seven-segment display is rendered by turning on or off any of seven segments named a through g
    There are ten unique signal patterns:

      0:      1:      2:      3:      4:
     aaaa    ....    aaaa    aaaa    ....
    b    c  .    c  .    c  .    c  b    c
    b    c  .    c  .    c  .    c  b    c
     ....    ....    dddd    dddd    dddd
    e    f  .    f  e    .  .    f  .    f
    e    f  .    f  e    .  .    f  .    f
     gggg    ....    gggg    gggg    ....

      5:      6:      7:      8:      9:
     aaaa    aaaa    aaaa    aaaa    aaaa
    b    .  b    .  .    c  b    c  b    c
    b    .  b    .  .    c  b    c  b    c
     dddd    dddd    ....    dddd    dddd
    .    f  e    f  .    f  e    f  .    f
    .    f  e    f  .    f  e    f  .    f
     gggg    gggg    ....    gggg    gggg

    Each entry consists of ten unique signal patterns, a | delimiter, and finally the four digit output value
    Within an entry, the same wire/segment connections are used (but you don't know what the connections actually are)

    In the output values, how many times do digits 1, 4, 7, or 8 appear?
    """
    count_1478 = 0
    for item in data:
        for output_value in item[1]:
            if len(output_value) in [2, 3, 4, 7]:
                count_1478 += 1

    return count_1478