Is there an option which could replace found pattern with counter? Counter is a variable that changes in increment of one in every replace. The initial value equals to zero. Seen this option in another software.
I agree that it looks like it should work. I also tried it in another application that uses the PCRE engine, and it also does not work, so perhaps it is a failing of the PCRE engine. Have you tried any other tools?
For counting matches, add a VBScript subfilter to your search/replace - it will get passed the replacement and can make changes to it, such as adding a counter value.