move counter to after processing