Sort items and display page count