Read all the files currently in the folder:
Directory.GetFiles[
^] will do that for you, and you can provide wildcards like "image*.jpg" to restrict them.
Then you could just sort them by path - but with only three digits, you may start to have problems quite quickly as string based comparisons work on the first non-matching character, so once you exceed three digits the ordering will fail.
A better approach is to use a custom comparer and return the file name with the max count, by breaking the file name down and converting the number portion to an integer.
Once you have the "highest value" currently on disk, you can add one to it and save the file as the new name, making sure to handle any "file exists" errors and repeat the whole operation if that happens (because web activities are "naturally" multiuser, and a different user may have used that number already).
But that's messy.
The way I'd do it is to store the file under a GUID filename, and use a Database to maintain a list of file name vs an Identity column to store the index number. Sounds harder, but it's trivial to do in practice, and a lot quicker to execute as well - particularly when you start to get a lot of files involved.