user: ### NOW ANSWER:
Question: What seasons  in series 7 did David E. Kelley write ?
Columns: ['Series #', 'Season #', 'Title', 'Directed by', 'Written by', 'Original air date', 'Production code']
Types: ['real', 'real', 'text', 'text', 'text', 'text', 'text']
Sample row: [1.0, 0.0, '"Pilot"', 'James Frawley', 'David E. Kelley', 'September8,1997', 'AM00']
SQL:

assistant: SELECT COUNT("Season #") FROM "Table" WHERE "Written by" = 'David E. Kelley' AND "Series #" = 7.0;