def uniq_count(lst):
    seen = set()
for w in lst:
    seen.add(w)
yield len(seen)
counts = list(enumerate(uniq_count(words), 1))
Ordered tally of the cumulative number of unique words seen by a given position