I used to know how to do this. Unfortunately, I've forgotten.

I have a column, let's say A, that will contain a various amount of repeated numbers. I want B to have a rising count of those numbers that restarts every time the number changes. For example...

1 1
1 2
1 3
2 1
2 2
2 3
2 4
3 1
3 2
3 3