Now I only can get actual page count from querying print job attribute after print job finishes. I found that page count increases on "localhost:631/jobs" during printing.
What I want is get page count before the first page is printed, because I want tell printer this data before sending any print data.