You learned how to model counting nodes as a longest path problem with uniform edge weights. Define dp[u] as the count, and update with dp[u] + 1. You practiced path reconstruction using a parent array. Store the predecessor whenever you update dp[v], then backtrack from the destination.
You handled unreachable nodes by initializing dp[u] = -Infinity and checking if dp[destination] is still after processing.