Made a working API, now you can use /ruta/cartago/1 for example, and it will return the number of stops for that trip in a geojson objects