update totalCount