Hello
I am looking for a formula for auto sequential numbering based on a cell text, for example starting from :

Apple
Apple
Apple
Plum
Plum
Plum
Plum
Tomato
Tomato
Pear
Pear
Pear

to achieve:

1 Apple
2 Apple
3 Apple
1 Plum
2 Plum
3 Plum
4 Plum
1 Tomato
2 Tomato
1 Pear
2 Pear
3 Pear

Thank you