How to set the image number you want on a Canon camera

As we all know the Canon cameras number images sequentially and this counter can be useful to know how many images you have taken on a camera. However when you take a memory card that has been used in a different camera and put it into your camera, the counter gets reset according to the last numbered image on the card, rather than according to the last number it used when it took the previous picture.
However by following a simple procedure you can change the counter in the camera to whatever you want when you put a new card in the camera. (Note I do recommend each camera has its own cards so as to avoid these problems if you swap cards between cameras).
  1. Format the new card in the camera and take a photo with it.
  2. Take the card out and put it in a card reader on a computer.
  3. Rename the image to the correct number e.g. IMG_xxxx.jpg
  4. Change file numbering in the camera menu to auto reset
  5. Put the card in the camera and take a photo. This new photo should have the correct number.
  6. Change file numbering in the camera menu to continuous
  7. If you need to put another card into the camera then format it in a PC before you do so, so that there are no images already on it, otherwise the problem will repeat itself.