update counting