The following can be done by hand or in a script:
Perform a find for all records with dscnnophoto.jpg in the field.
Use Replace field contents with the serial number option to assign serial numbers to all such records.
This is a one time fix, but if you first determine the maximum existing value in this field, you can use Replace Field contents manually to assign serial numbers to newly imported records with a starting value 1 greater than this maximum.
In a script, you'd have to loop through the new records, assigning serial numbers if this is something you need to do over and over again. (Can't assign serial numbers via replace field contents and also be able to use a calculation to set the initial value, unfortunately.)