This will count the number of subpages in the rowset:
$paginator->count();
This will count the total number of elements in the rowset:
$paginator->getTotalItemCount();
If you have more than one subpage, maybe you need to use the second parameter in getItem() , which is several subpages?
$paginator->getItem(1, 1);
BTW: getItem() not zero-based, so the first element in the set of strings is getItem(1) .
In my similar situation, I have 1 subpage, and using $paginator->getItem(1) give me the correct result
source share