update pagination count handling