add bycount logging