Recently, I downloaded images from the SD card on my Nikon D810 that had numbers from DSC7042 to DSC7107 because I needed some images right away. I then put the card back into the camera (NO re-formatting or changing settings in any menu) and continued shooting. At the end of the shoot, the camera had re-numbered all the pictures from DSC0361 to DSC0652. In other words, the former DSC7042 was now DSC0361. How can I restore the camera's numbering and (ii) how can I prevent this from happening again?
Take a look at this question at Nikon.
It talks about Custom Settings Menu d6:
By default sequential numbering is set to "OFF"
Sequential file numbering OFF - When a new card is inserted the current folder and file numbers are not continued, file numbering starts again in a new folder.
Sequential file numbering ON - When a new card is inserted the camera can continue numbering files in sequence from the last file number on the previous card.