Something like this
SELECT trip_id, stop_id, COUNT(*) as cnt
FROM operation_ticket_part_stops
GROUP BY trip_id, stop_id
ORDER BY cnt DESC
LIMIT 1
This query sorts your sub query and takes the first record only (which holds the same result as the Max)