def streets_per_node_counts(G: nx.MultiDiGraph) -> dict[int, int]:
    """
    Calculate streets-per-node counts.

    Parameters
    ----------
    G
        Input graph.

    Returns
    -------
    spnc
        Dictionary keyed by count of streets incident on each node, and with
        values of how many nodes in the graph have this count.
    """
    spn_vals = list(streets_per_node(G).values())
    return {i: spn_vals.count(i) for i in range(int(max(spn_vals)) + 1)}

    Calculate streets-per-node counts.

    Parameters
    ----------
    G
        Input graph.

    Returns
    -------
    spnc
        Dictionary keyed by count of streets incident on each node, and with
        values of how many nodes in the graph have this count.
    
osmnx/stats.py