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

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

    count = len(self._list_dirs_in_dir(path, pattern))
    self._info(('%s    director%s.' % (count, ('y' if (count == 1) else 'ies'))))
    return count
