Hi Les,
It is not clear exactly what you are after. Let's use a specific example
g = ExampleData[{"NetworkGraph", "Friendship"}]
All paths between "Ben" and "James"
pathsBenJames = FindPath[g, "Ben", "James", Infinity, All]
(*
{{"Ben", "Anna", "Rudy", "James"}, {"Ben", "Carol", "Anna", "Rudy",
"James"}, {"Ben", "Rose", "Anna", "Rudy", "James"}, {"Ben", "Anna",
"Larry", "Linda", "James"}, {"Ben", "Carol", "Anna", "Larry",
"Linda", "James"}, {"Ben", "Rose", "Nora", "Larry", "Linda",
"James"}, {"Ben", "Rose", "Nora", "Anna", "Rudy", "James"}, {"Ben",
"Rose", "Anna", "Larry", "Linda", "James"}, {"Ben", "Anna", "Nora",
"Larry", "Linda", "James"}, {"Ben", "Carol", "Anna", "Nora",
"Larry", "Linda", "James"}, {"Ben", "Rose", "Nora", "Larry", "Anna",
"Rudy", "James"}, {"Ben", "Rose", "Nora", "Anna", "Larry", "Linda",
"James"}, {"Ben", "Rose", "Anna", "Nora", "Larry", "Linda",
"James"}, {"Ben", "Anna", "Rose", "Nora", "Larry", "Linda",
"James"}, {"Ben", "Carol", "Anna", "Rose", "Nora", "Larry", "Linda",
"James"}}
*)
How many are there?
Length@pathsBenJames
(* 15 *)
Which paths include "Rudy"
pathsRudy = pathsBenJames // Select[MemberQ[#, "Rudy"] &]
(*
{{"Ben", "Anna", "Rudy", "James"}, {"Ben", "Carol", "Anna", "Rudy",
"James"}, {"Ben", "Rose", "Anna", "Rudy", "James"}, {"Ben", "Rose",
"Nora", "Anna", "Rudy", "James"}, {"Ben", "Rose", "Nora", "Larry",
"Anna", "Rudy", "James"}}
*)
Length@pathsRudy
(* 5 *)
Length of each path
Length /@ pathsRudy
(* {4, 5, 5, 6, 7} *)
I think that answers your first question, right?
Using the above example, can you explain what you mean by
Also, what I really want to know is which nodes have the highest
count, ie I want to do this for all nodes, i, and then sort the count.