def compute_total_transitions(paths):
    """Computes the total number of nodes

    Parameters
    ----------
    paths : pathpy.Paths

    Returns
    -------
    total_paths : int
    """

    total_paths = 0
    lengths = paths.path_lengths()

    for key, value in lengths.items():
        total_paths += value[1] * (1 + key)

    return total_paths