import threading


def count_threads_with_name(name):
    """
    Returns the number of currently existing threads with the given name
    """
    n_count = 0
    for th in threading.enumerate():
        if th.name == name:
            n_count += 1
    return n_count