How do I increase the max number of frames?
This limit cannot be changed. You cannot alter builtin properties deriving from bpy.types.Property. Every attribute in api docs is marked as readonly.
The scene's frame_end property hard and soft maximum is just set to 500,000*.

If you need to render longer video than that you will have to do that in another software.

Using negative frames or messing with time-remapping does not help.



*As of 2nd March 2016 the maximum is 500,000 (previously 300,000):
https://developer.blender.org/rBf7062b2407c65dcf85904242281a13339d47a20a