You need a commerical quality PCL interpreter to count pages in a PCL file. There are many ways to mark the end of a page... changing back to simplex from duplex, lines per page, formfeeds, resets, etc.
PageTech has several products (retail to OEM) that count PCL3/4/5/5e/5c/6 level pages...