This function returns the numbers of the statistics.
    @param runResults: All the results of the execution of one run set (as list of RunResult objects)

def get_stats_of_run_set(runResults, correct_only):
    """
    This function returns the numbers of the statistics.
    @param runResults: All the results of the execution of one run set (as list of RunResult objects)
    """

    # convert:
    # [['TRUE', 0,1], ['FALSE', 0,2]] -->  [['TRUE', 'FALSE'], [0,1, 0,2]]
    # in python2 this is a list, in python3 this is the iterator of the list
    # this works, because we iterate over the list some lines below
    listsOfValues = zip(*[runResult.values for runResult in runResults])

    columns = runResults[0].columns
    main_status_list = [(runResult.category, runResult.status) for runResult in runResults]

    # collect some statistics
    totalRow = []
    correctRow = []
    correctTrueRow = []
    correctFalseRow = []
    correctUnconfirmedRow = []
    correctUnconfirmedTrueRow = []
    correctUnconfirmedFalseRow = []
    incorrectRow = []
    wrongTrueRow = []
    wrongFalseRow = []
    scoreRow = []

    status_col_index = 0  # index of 'status' column
    for index, (column, values) in enumerate(zip(columns, listsOfValues)):
        col_type = column.type.type
        if col_type != ColumnType.text:
            if col_type == ColumnType.main_status or col_type == ColumnType.status:
                if col_type == ColumnType.main_status:
                    status_col_index = index
                    score = StatValue(sum(run_result.score or 0 for run_result in runResults))
                else:
                    score = None

                total   = StatValue(len([runResult.values[index] for runResult in runResults if runResult.status]))

                curr_status_list = [(runResult.category, runResult.values[index]) for runResult in runResults]

                counts = collections.Counter((category, result.get_result_classification(status))
                                             for category, status in curr_status_list)
                countCorrectTrue             = counts[result.CATEGORY_CORRECT,             result.RESULT_CLASS_TRUE]
                countCorrectFalse            = counts[result.CATEGORY_CORRECT,             result.RESULT_CLASS_FALSE]
                countCorrectUnconfirmedTrue  = counts[result.CATEGORY_CORRECT_UNCONFIRMED, result.RESULT_CLASS_TRUE]
                countCorrectUnconfirmedFalse = counts[result.CATEGORY_CORRECT_UNCONFIRMED, result.RESULT_CLASS_FALSE]
                countWrongTrue               = counts[result.CATEGORY_WRONG,               result.RESULT_CLASS_TRUE]
                countWrongFalse              = counts[result.CATEGORY_WRONG,               result.RESULT_CLASS_FALSE]

                correct                 = StatValue(countCorrectTrue + countCorrectFalse)
                correctTrue             = StatValue(countCorrectTrue)
                correctFalse            = StatValue(countCorrectFalse)
                correctUnconfirmed      = StatValue(countCorrectUnconfirmedTrue + countCorrectUnconfirmedFalse)
                correctUnconfirmedTrue  = StatValue(countCorrectUnconfirmedTrue)
                correctUnconfirmedFalse = StatValue(countCorrectUnconfirmedFalse)
                incorrect               = StatValue(countWrongTrue + countWrongFalse)
                wrongTrue               = StatValue(countWrongTrue)
                wrongFalse              = StatValue(countWrongFalse)

            else:
                assert column.is_numeric()
                total, correct, correctTrue, correctFalse,\
                       correctUnconfirmed, correctUnconfirmedTrue, correctUnconfirmedFalse,\
                       incorrect, wrongTrue, wrongFalse =\
                    get_stats_of_number_column(values, main_status_list, column.title, correct_only)

                score = None

        else:
            total, correct, correctTrue, correctFalse,\
                   correctUnconfirmed, correctUnconfirmedTrue, correctUnconfirmedFalse,\
                   incorrect, wrongTrue, wrongFalse =\
                (None, None, None, None, None, None, None, None, None, None)
            score = None

        totalRow.append(total)
        correctRow.append(correct)
        correctTrueRow.append(correctTrue)
        correctFalseRow.append(correctFalse)
        correctUnconfirmedRow.append(correctUnconfirmed)
        correctUnconfirmedTrueRow.append(correctUnconfirmedTrue)
        correctUnconfirmedFalseRow.append(correctUnconfirmedFalse)
        incorrectRow.append(incorrect)
        wrongTrueRow.append(wrongTrue)
        wrongFalseRow.append(wrongFalse)
        scoreRow.append(score)

    def replace_irrelevant(row):
        if not row:
            return
        count = row[status_col_index]
        if not count or not count.sum:
            for i in range(1, len(row)):
                row[i] = None

    replace_irrelevant(totalRow)
    replace_irrelevant(correctRow)
    replace_irrelevant(correctTrueRow)
    replace_irrelevant(correctFalseRow)
    replace_irrelevant(correctUnconfirmedRow)
    replace_irrelevant(correctUnconfirmedTrueRow)
    replace_irrelevant(correctUnconfirmedFalseRow)
    replace_irrelevant(incorrectRow)
    replace_irrelevant(wrongTrueRow)
    replace_irrelevant(wrongFalseRow)
    replace_irrelevant(scoreRow)

    stats = (totalRow, correctRow, correctTrueRow, correctFalseRow,\
                       correctUnconfirmedRow, correctUnconfirmedTrueRow, correctUnconfirmedFalseRow,\
                       incorrectRow, wrongTrueRow, wrongFalseRow,\
             scoreRow)
    return stats