GimpUi.PageSelector.prototype.get_n_pages

function get_n_pages(): Number(gint) {
    // Gjs wrapper for gimp_page_selector_get_n_pages()
}
  

Since 2.4

Returns

the number of pages in the document to open.