adds count method for getting number of lines in the log file. updates example for testing.