from typing import Counter


def numdups(names, fmt='{name}-{number}'):
    """Enumerate duplicate names."""
    duplicate = {k: v for k, v in Counter(names).items() if v > 1}
    for name, count in duplicate.items():
        for num in range(1, count + 1):
            idx = names.index(name)
            names[idx] = fmt.format(name=name, number=num)
    return names