Logger: added ability to count a messages