An old thread from three years ago, but the problem still remains with the Android system camera app not having a way either to manually set the next IMAGxxxx.jpg or VIDEOxxxx.mp4 numbers, or even intelligently set the next number itself by observing what is already held in storage. The app just blindly starts from number 0001 for example after a reset, or in my case I moved my SD card with all my most recent images and videos into an identical new HTC U11 handset, but despite these files being there the next pic and video taken start at number 0001 again.
I'm pleased to confirm that me_how's neat little trick still works fine on Android Pie (9):
1. make sure the last image/video you want to restart your numbering from is in /sdcard/DCIM/100MEDIA folder ie. IMAG1233.JPG
2. take a photo
2. note new photo/video number ie. IMAG0003.JPG
3. now rename the photo/video you just taken ie. IMAG0003.JPG -> IMAG0004.JPG
4. take another shot
now the camera will find the file name it wanted to use next (IMAG0004) already exists and instead of overwriting it, it will automatically skip not to the next sequence number but all the way to the last image number + 1
5. go and check that second photo already is IMAG1234.JPG
You can obviously do the same trick for VIDEO1234.MP4.
What a simple solution! But what a shame that the camera app needs this little nudge to get its act together!!