Task: Text to Code
Input (English): select the rows whose directed by record fuzzily matches to win phelps . among these rows , select the rows whose written by record fuzzily matches to david e kelley and william m finkelstein . the number of such rows is 2 .
Output (English): eq { count { filter_eq { filter_eq { all_rows ; directed by ; win phelps } ; written by ; david e kelley and william m finkelstein } } ; 2 }