replace the counter