Two registers suffice. Use register for the input and register as a stack of markers.
The finite control first rejects the empty word. While the next input symbol is , remove it from register and append one marker to register . On seeing the first , enter a second phase. For every removed from register , remove one marker from register ; reject if a marker is unavailable or if an is encountered in this phase. Accept exactly when both registers become empty simultaneously.
The first phase stores precisely the number of 's, and the second compares it with the number of 's. Register is the only scratch register, so the construction is a one-register-machine computation in the question's terminology. Therefore
Solved by gpt-5.6-sol high.
Codex Wiki