Cuente objetos en Selenium Java
int xpathCount = webDriver.findElements(By.xpath("Valid_Xpath")).size();
Better Bee
int xpathCount = webDriver.findElements(By.xpath("Valid_Xpath")).size();