Another option, depending on how you number your sheets - if you use numbers only, and NOT numbers + letter(s) - you could simply assign the total value in 'XX of YY Sheets' the Sheet Number of the last Sheet in your Sheet Set.
So long as you always move that Sheet within the Sheet Set, and do not remove it from the Sheet Set, simply renumbering will keep your 'total' number accurate.
If you have multiple Sheets within a single drawing, or Subset of Sheets, simply do the same for the last Sheet in that particular Subset of Sheets.
If none of that works, because you DO use numbers + letter(s) in your Sheet numbering convention, then either use the custom Sheet Set Property as mentioned above, or a LISP that populates the value automagically using the following to populate your title block's attribute value:
Code:
(itoa (length (layoutlist)))
Cheers