write counter threshold