updating counts