Thanks Monk
It works for the first line of the text file, but the events on the rest of the file continue the numeration from the first line, and the event from each line should be independent.
But I will it use to count the events in a whole document!!:)