You can read the depth of the stack using:
glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &result);
It should indeed be at least 32.
That's assuming you're actually using the GL_MODELVIEW matrix stack, and you're not accidentally pushing all your transforms into GL_PROJECTION or something.
Ideally though you should be computing the matrices yourself, as this functionality is deprecated.