From Intermediate Scripting ...
Important Note: Do not think of Page IDs (and Chapter IDs) as you would Page Numbers in a book. An ID is assigned whenever a Page is created and cannot change; it is also never reused, so if you delete PageID #3, a new page will NOT fill in that gap.