Pagination, display 'Next 20 Results' etc
Not sure about a load of math, but if you've got pageInfo setup like in the docs, should be something like this:

{% set totalPages = pageInfo.totalPages %}
{% set itemsPerPage = 20 %}
{% set currentPage = pageInfo.currentPage %}
{% set totalItems = pageInfo.total %}

{% set wholeItems = (totalPages - 1) * itemsPerPage %}
{% set remainderItems = totalItems - wholeItems %}

{% if currentPage == totalPages - 1 %}
    Next {{ remainderItems }} items.
{% else %}
    Next {{ itemsPerPage }} items.
{% endif %}