I would like to count the number of pages in a RTF or MS Word document, using python. Is this possible?
Not without rendering the actual page.
The number of pages will depend on many things, such as the size of the fonts being used, the margins in all four directions on the page, and the insertion of any other sized artifacts such as images.
So what you would have to do is render the document in an RTF library of some sort, and let that library tell you how many pages there are.