Update loop count