Forum How do I...?

Get The Final Page Number

Khaldei
Hello, this is my first post, and I'm a bit stumped on my current project. I can't seem to figure out how to get the final page number of the document. Basically, I would like the footer of the page to say...

Page 1 of 10

assuming I have 10 pages.

Currently I've got the following...

@page {
  @top-right {
    font: 11pt "Gill Sans", serif;
    content: "Protocol Version X.0\A January 31, 2008"; 
    vertical-align: bottom;
    padding-bottom: 2em; 
    white-space: pre;
  }

  @bottom-center {
    font: 11pt "Gill Sans", serif;
    content: counter(page) " of ";
    vertical-align: top;
    padding-top: 2em;
  }
}


What should I put after content: counter(page) " of "? Any help would be much appreciated!
mikeday
"counter(pages)" will return the total number of pages in the document.