Based on the screenshot you've provided, it looks like you can do this really easily by using the OID field. Those integers match the photo numbers.
n = 4 - len(str(oid))
Test this on a new string field to make sure it works, because it will overwrite all of your existing values. Again, this will only work in this specific case if you know you can count on those OIDs matching.
As @paul points out, the code above could be reduced to a single line in the expression.
much cleaner than I what originally had.
As per the OP comment about OID not always working for this, here are a couple of things to keep in mind. First, with shapefiles/dbase tables, the OID/FID field will always be consecutive integers (regardless of deleted records), but gdb feature classes have an OBJECTID field that is not updated when records are deleted, so you could easily have 1, 2, 5, 7, 12, 13, 14, 15. So the code above would definitely not work with a gdb feature class...
Second, using field calculator will always iterate through rows in the order of the OID field (as far as I know).
Therefore, if your data is in dbase/shp tables and your photos are sequentially numbered based beginning with 1 in the first row, then this method actually should be reliable.
That said, this will work independently of the OID field, but it's redundant unless you are using gdb feature classes or tables, because it's still iterating on OID, and OID is +1 integers.
n = 0
if value = "":