Here is my dataframe:
Number Action
1 Running
2 Running
3 Swimming
4 Eating
5 Eating
I would like to add a variable to count the number of appearance, like this:
Number Action Count
1 Running 1
2 Running 2
3 Swimming 1
4 Eating 1
5 Eating 2