Sorts the given array of representations in a descending order of fitness and returns the number of evaluation that was required for the ranking to finish.
Evaluation of the candidates is done by the provided problem component.
representations - The population to be sorted.
problem - The problem descriptor to be used for evaluation.
random - The random generator object used for sorting.
the number of evaluations that were needed to rank the given set of representations