info()

Returns pagination information for one HTML element or for the first element in a result set (see results) of a query across all sections in a Print context (see query(selector)). 

The returned information is of the type PaginationInfo (see PaginationInfo).

This function can only be used in a Post Pagination Script ; see Post Pagination Script API.

For an example see: Creating a Table Of Contents.