How is the "Longest Route" calculated in Ticket to Ride?
The owner of the longest continuous number of train cars is the winner.  (It works just like longest road in Settlers of Catan)

Here is an image provided my Matthew Frederick from his original edition of the game.  He also notes that the online versions provided by Days of Wonder work this way.