Wordpress uses numpages global variable to store the number of pages in a multipage post. It is set in the function setup_postdata($post) defined in [wordpress root folder]/wp-includes/functions.php. The split pages are stored in the global variable pages.
Theme developers can use numpages global variable to display the count of split pages in a multipage post.
Back to full list of global variables.

