Added counter to logger