def get_decoding_route_length(molecular_graph):
    """ Returns the number of subgraphs in the `molecular_graph`s decoding route,
    which is how many subgraphs would be formed in the process of deleting the
    last atom/bond in the molecule stepwise until only a single atom is left.
    Note that this is simply the number of edges plus two.

    Args:
      molecular_graph (PreprocessingGraph) : Molecule to be decoded.

    Returns:
      n_decoding_graphs (int) : Number of subgraphs in the `molecular_graph`s
        decoding route.
    """
    return molecular_graph.get_n_edges() + 2