I have just downloaded the latest version of Aspose.PDF for .Net 3.5 and it looks like the $P is not longer being turned into the total page numbers.
Here is my code (I had to add the .Generator namespace in for the lastest version):
Aspose.Pdf.Generator.HeaderFooter footer = new Aspose.Pdf.Generator.HeaderFooter();
section.OddFooter = footer;
section.EvenFooter = footer;
Aspose.Pdf.Generator.Text txt = new Aspose.Pdf.Generator.Text("Page: ($p of $P)");
footer.Paragraphs.Add(txt);
This worked fine in the old version (3.6.2.0) the version I just downloaded and updated my code to run with (adding the .Generator namespace prefix) now produces this:
Page: (1 of $P)