'Wrapper for `Count Items In Directory` returning only file count.'

def count_files_in_directory(self, path, pattern=None):

    count = len(self._list_files_in_dir(path, pattern))
    self._info(('%s    file%s.' % (count, plural_or_not(count))))
    return count
