Counting elements with the same selector in webdriver.io
This is how you do it:
client.elements('.myElements', function(err,res) { console.log('element count: ',res.value.length);});
Explanation: with elements
you fetch all elements according given selector. It returns an array of webdriver elements which represents the amount of existing elements on the page.