Restrict pagination to X pages

A post was split to a new topic: Paginate last 10