Added method to calculate number of routes between two nodes.