Option counter pages

An alternative case for the items to be added by the ajax callback only
receives the counter parameter to define the number of pages, if
defined.