You can create a counter insider the for loop like this:

    for i, source in enumerate(sources):
        # i will start at 0 and increase by 1 each iteration