optimizations and fixes in log watcher repeat count processing