Is it possible to change the number of undos that are allowed?
Not really - they're fixed at 16 in XLv.X.
If you wanted fewer, you could probably use an event macro to
perform an action that clears the undo queue.
If you wanted more, you could write some VBA code to save more
actions, but IMO, unless you were only concerned about a few of the
possible actions, the task would be a horrendous amount of work and
would be expensive in both processing time and memory.