This is not possible.
We only have 50, 100, and 200.
Why would you want to limit the number of undos? Having a large number of undos was something that it took years to get and significantly changed the way one can work in these programs.
You can decrease the number of Undos by modifying the Adobe Illustrator Prefs file manually, but the lowest possible setting is 5, even if you set it to 1.
- Quit Illustrator
- Open the Adobe Illustrator Prefs file with a plain text editor
- Search for maximumUndoDepth
- Set it to maximumUndoDepth 1 (for example) and save the file
Open Illustrator. You now have only 5 Undos.
Notice that it may be a good idea to first make a backup of the original Prefs file (in case something goes wrong).