Tweak counter backport to play well with 3.x