Returns the number of items on the current page.
int itemsOnPage(int totalItems) { if (totalItems < 1) return 0; final (start, end) = getSliceBounds(totalItems); return end - start; }