public function elementCount($path, $file) { $nodeList = $this->getNodeList($path, $file); return $nodeList->length; }