CREATE TABLE table_23279434_1 (season__number VARCHAR2, written_by VARCHAR2, series__number VARCHAR2)

What seasons in series 7 did David E. Kelley write ?
SELECT COUNT(season__number) FROM table_23279434_1 WHERE written_by = "David E. Kelley" AND series__number = 7
SELECT COUNT("season__number") FROM "table_23279434_1" WHERE "David E. Kelley" = "written_by" AND "series__number" = 7