Complex sentence: Railroads typically wanted a locomotive with fewer axles as this would reduce the cost of maintenance.
Split into simpler sentences: Railroads typically wanted a locomotive with as few axles as possible. This would reduce the cost of maintenance.