The required GetPages routine returns the total number of video pages available in the current video card mode, not the current page number. This is a counting number and is not 0 based.
OSErr = Status(theDeviceRefNum, cscGetPages, &theVDPageInfo );