in reply to counter of files? something else?

I don't know where to start.

If you can show us a simple example, maybe with 10-20 carefully selected lines? That would be helpful. Very helpful. Your code so far would also be helpful, very helpful.

Enclose the data and program with

<c> and </c> tags