Function currentPageSelector

Calculates the current page number.