Couldn't find any prior references to this matter -
Pages.add has two issues that I consider bugs.
a) when you add a page it returns nil, according to the official API doc pages. This would be a really daft thing to do but actually the code appears to do the right thing and returns the created page. So far as I can tell from testing, anyway. The API doc needs correcting.
b) If you add a page to a document that has only there default first page (i.e. no set scene name) then you do not end up with two pages as one might expect. No, a single page - the one you added - is your lot. It seems that the default state for a new document is that sketchup.active_model.pages is empty. That isn't very logical to my way of thinking. At the very least a mention of that in the doc relating to Pages might be nice. I discovered this when my plugin code 'added' a page, set everything to hidden and inserted a new component. I was left with a model that only had my new page with the component visible. Workaround would seem to be adding a new page with some default name if the pages count is 0 before doing whatever else one was about to do.

