Now this sure caused some head scratching. In the process of unicode-math testing some code which otherwise worked started breaking; here's a minimal example:
\advance\ii by 1\relax
\ifnum\ii<145 % <- exactly!
The culprit being largely the following line in \new@mathversion:
\global\expandafter\newcount\csname c@\expandafter \@gobble\string#1\endcsname
When the lower level of registers runs out, etex.sty's \alloc@ redefines \newcount to use the extended pool; the execution of this branch throws an error when preceded by \global.
As far as I know writing \global\newcount is the same as \newcount, so I'll change this in the 2e code.