Task: Text to Code
Input (English): Step 1: For each row in airports table, find the corresponding rows in routes table.
Step 2: find the number of different rid in the results of step 1 whose country equals American Airlines
Output (English): SELECT Count ( DISTINCT T1.rid ) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid = T2.apid WHERE T2.country = "American Airlines"