find_branch_num function

Find the branch that leads from one node to another.