I don't know if it would help in your case, but I did something similar with a command to input numbers. The command used a prefix/suffix structure so just the numbers wouldn't set it off. In my case I used "positive" and negative" as the prefix triggers, and then had "zero;one;two;three;four;five;six;seven;eight;nine;[0..360]" as the suffix. I used both words and numbers to catch the best detected version.
The rest of the code is similar to Pfeil's, I did a text compare of the suffix variable and set the INT variable to its value ("nine" to "9"), and then if it didn't match any text numbers I set the INT variable to the converted value of the suffix.
So in your case perhaps you could have a prefix of "page" and then have a suffix like mine,, with the 360 being greater or less than your expected max pages.
It's basically the same procedure, just using suffix instead of the dictation. Don't know which would work better.