Correcting photo number sequence
You can change the number stored in

~/Library/Media/PhotoData/MISC/DCIM_APPLE.plist


The integer value is stored under the key DCIMLastFileNumber.

This property list is accessible from a backup, so you can backup your iPhone with iTunes, modify the backup, and then restore from backup. If your device is jailbroken, you can edit the file directly on the device.