Rewrite counter