There's no direct way to detect or count page breaks (PAGE_BREAK) in a document.
References:
If text is so long that it cannot fit inside a bounding box, Autofit is deactivated and set to AutofitType.NONE, meaning that the long text does not shrink to fit inside the bounding box.
References:
There's no direct way to update Tables that are linked to Google Sheets.
References: