Hi @RDAOU, I'm having the same problem as this one but mine involved linked files.
I'm creating a sheet list on one main file and the other models are linked there sheets on every link. I did create a nice sequence as shown below, the only thing that's missing is the sequence numbering so I tried finding ways to solve this and came up here on this thread.

I tried using your dynamo script but it doesn't work the way it should be. Maybe because the sheets are on the links? I don't know if this can be solved by Dynamo.
Thank you