Set totalItems automatically when client side paging