'Returns and logs how many elements the given ``xpath`` matches.
Arguments ``source`` and ``xpath`` have exactly the same semantics as
with `Get Elements` keyword that this keyword uses internally.
See also `Element Should Exist` and `Element Should Not Exist`.'

def get_element_count(self, source, xpath='.'):

    count = len(self.get_elements(source, xpath))
    logger.info(("%d    element%s    matched    '%s'." % (count, s(count), xpath)))
    return count
