loop_count update