Or whichever length route you're currently at.
You can always make a route larger than the one you're claiming. For example, when you start, you need to make a 3 length route. If your first is a 5, it still counts for your three.
Edit - spelling
Just to clarify, in the situation you describe it would count for your 3 carriage but you would still take a bonus chip for the 5 route length, if one was still available.