private int getUpdateCount(int numUpdateQueries, List<Integer> affectedRowsByQuery) {
    return affectedRowsByQuery.stream()
        .limit(numUpdateQueries)
        .mapToInt(Integer::intValue)
        .sum();
  }
@param jdbcResource A {@link MultiDataSourceJdbcResource} instance responsible for providing all the necessary 
                    resources to be able to perform transactional database calls.
@return 0 if skipCount is true, the number of aborted transactions otherwise
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/functions/AbortTxnsFunction.java