/**
  * Returns the number of nodes that match the specified xPath selector,
  * eg. "table" would give the number of tables.
  * @param string $locator xPath selector
  */
 public function getXpathCount($locator)
 {
     $pos = stripos(trim($locator), 'css=');
     if ($pos !== false && $pos == 0) {
         return $this->getCssCount($locator);
     }
     return parent::getXpathCount($locator);
 }