'Returns number of elements matching `xpath`
The default return type is `str` but it can changed to `int` by setting
the ``return_str`` argument to Python False.
One should not use the xpath= prefix for \'xpath\'. XPath is assumed.
Correct:
| count = | Get Matching Xpath Count | //div[@id=\'sales-pop\']
Incorrect:
| count = | Get Matching Xpath Count | xpath=//div[@id=\'sales-pop\']
If you wish to assert the number of matching elements, use
`Xpath Should Match X Times`.'

@keyword
def get_matching_xpath_count(self, xpath, return_str=True):

    count = len(self.find_element(('xpath=' + xpath), first_only=False, required=False))
    return (str(count) if return_str else count)
