user: Question: How many episodes were written by Gregg Mettler?
Columns: ['No. in series', 'No. in season', 'Title', 'Directed by', 'Written by', 'Original air date', 'Production code']
Types: ['real', 'real', 'text', 'text', 'text', 'text', 'real']
Sample row: [98.0, 1.0, '"Episode I: The Baby Menace" (Part 3)', 'Terry Hughes', "David M. Israel & Jim O'Doherty", 'September21,1999', 501.0]
SQL:

assistant: SELECT COUNT("No. in series") FROM "Table" WHERE "Written by" = 'Gregg Mettler';