Adding counter logging.