Saying it doesn't "count well" doesn't really help all that much when it's not clear as to what you are counting. The code suggests that that number is simply the number of lines read in a file but that doesn't really make much sense that it would be changing assuming you are using the same file and are not adding entries to the file.
You should explain exactly what you are wanting to log (don't mention any code, simply state your desire in english).
Also, post a link to the plugin or show the code that is writing to this file that you are reading.