Count Sheet number

I am desperately looking for a way to count the number of sheets so that I can write the total number on each sheet, e.g. sheet 5 of 35.
I've been searching forever and can only find Lisp files for AutoCAD that don't work. Can someone help me?

Counting 35 sheets its not so much fun. The total number can also be set via a field, that would be not nice but the only way I know so far.