I just recently navigated to var>mobile>media>DCIM and copied all of my photos from the 100APPLE, 101APPLE, etc to my computer. There were a lot of gaps between photo names so I used a renamer program to change all the photo names to be in order. With about 2500 photos, I cleaned up and compressed these folders to have exactly 999 photos in 100APPLE (IMG_0001 to IMG_0999), 999 photos in 101APPLE (IMG_1001 to IMG 1999), and the rest of them in sequential order in 102APPLE (IMG_2001 on). I then erased everything in the DCIM and PhotoData directories on the phone, copied the new cleaned up folders from my computer into DCIM on the phone, and opened photo.app on my phone to let it remake the data and thumbnails. This brought up the first issue. The photos came up in photos.app in the order of 101APPLE, 100APPLE, 102APPLE. I'm completely stumped on this one as the software should have grabbed my three folders in order.

I noticed my second issue when I tried to figure out the first. I emptied DCIM and PhotoData again and took a picture. This picture was now the only photo in my photos folders and I assumed it would come in as IMG_0001 in the new phone created 100APPLE, but instead it came in as IMG_4001 in the phone created 104APPLE. This leads me to believe that there's some more stored photo data other than in var>mobile>media>photodata that I need to clean up.

Any insight would be appreciated. Thanks.
iphone 4, 4.2.1