Do sort in getLevelCountData before return