def calculate_node_degree_in_collection(collection, v):
    """
    calculates the degree of node v in collection by the formula:
    deg(v, collection) = the number of clusters in collection, v belongs to

    :param collection: collection of clusters
    :param v: node
    :return: degree of v in collection
    """
    counter = 0
    for cluster in collection:
        if v in cluster:
            counter += 1
    return counter