New pagination

Show the number of pages and allow navigating to pages directly rather
than only with Next and Previous buttons.