• The code that I'm dealing with requires a prefix that may or may not be there. The suffix is just a straight counter with leading 0's.

    I would have gone with the Max-Count method if that were not the case.