Variables for Header & Footer Section
The system variables sys.pageNumber and sys.totalPages are variables that can be used in the header and footer section:
Displaying current page with sys.pageNumber
The following expression is to displays the current page number:
{{sys.pageNumber}}
Displaying total pages with sys.totalPages
The following expression is to displays the total pages.
{{sys.totalPages}}