Well, the shortest number of baseboards would be 1, because there are certainly places where there is a 125 meter difference in elevation in a very short horizontal length, for example the base of Devil's Tower National Monument in Wyoming is 4400 feet, and the top is 5115, achieved over a lateral distance of about 4 baseboard squares (40 meters). The shortest route for a railroad like the one ascending Pikes Peak in Colorado which is a cog railroad, is about 400 to 500 feet, or 10 to twelve baseboard squares. The maximum grade for a conventional railroad is about about 5 percent (one portion of the Saluda grade in NC was this steep) which means a rise in 5 feet in a distance of 100 feet. The shortest distance a 5 percent grade could achieve your 125 meter rise would be over about 2500 meters, or a length of about 3 and 1/2 baseboards. Saluda, though was unusual; the typical maximum grade in the US is not much higher than about 2 percent, which would require a length of about 6,250 meters, or about 9 boards. A grade of 1 percent would require about 18 boards to rise 125 meters. In the real world, a right of way rising 125 meters would follow a river valley, or stream, and would not be a straight line, which would mean the number of boards required would be less, but the distance of the right of way from one end to the other would be about the distances given above. 
But what are you trying to accomplish? If you're trying to join two routes, you probably don't need a DEM to do it, and likely won't find one that will fit exactly. 
ns