names = ['Alice', 'Bob', 'Carl', 'Dave', 'Bob', 'Earl', 'Carl', 'Frank', 'Carl'
    ]
counter = collections.Counter(names)
print('Counter: %s' % counter)
result = []
for name, counts in counter.items():
    result.append(name)
for i in range(1, counts):
    result.append('%s_%d' % (name, i))
print(result)
Labeling duplicates in a list