If a stamp repeats further down the file it gets a new counter increment. If you don't want that then the uniq needs to be sort | uniq which will apply the same counter to the same stamp throughout the file.