This is what I used.
Dim uiItem As CVExtenderReportUIItem = args.Report.CurrentUIItem
If uiItem.UIItemType = XFReportUIItemType.PageFooterPageNumber Then
uiItem.SetPageNumberDisplayInfo(True, "page {0} of {1}")
End If
I have a book with three report elements: 2 pages, 1 page, 2 pages. The output I get is not perfect all the time, so there might be a few gremlins still; today it looks like this:
page 1 of 2
page 2 of 2
page 3 of 5
page 4 of 5
page 5 of 5
So I would say {0} is reliable, whereas {1} might not always be.
If that code doesn't work like that for you, consider opening a Support case.