Among the trains running west, how many trains have three-wheeled, jagged roof cars?
west is an direction; three-wheeled refers to wheels = 3; jagged roof refers to roof = 'jagged'
SELECT SUM(CASE WHEN T2.direction = 'west' THEN 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.wheels = 3 AND T1.roof = 'jagged'