add totalCount to JSON for paging