Though it should according to XPath, the following does not work with this extension (nor apparently do other expressions not yielding a nodeset):
<?php
$paragraph_count = $page->xpath("count(//par)\");
?>
The following will work instead, in the meantime, however:
<?php
$paragraph_count = count($page->xpath(\"//par\"));
?>