He wrote all of 3 and 4, and all bar one of 5.
The ones of 2 he didn't write were:
204 A Distant Star by D. C. Fontana
205 The Long Dark by Scott Frost
206 Spider in the Web by Larry DiTillio
207 Soul Mates by Peter David
210 GROPOS by Larry DiTillio
214 There All the Honor Lies by Peter David
217 Knives by Larry DiTillio
He may have gotten the writing credit for most of the later seasons, but there were actually a room full of writers working on every episode. My pal Zoran spent some time in the writers' room when he went to the set in season 4, as well as me hearing about it from Larry DiTillio. So I got my info from first-hand witnesses.
Simple logic: Why have an executive story editor if the executive producer of the show is writing all of it? Answer: To insert the scenes written by other writers into the story broad strokes written by JMS and keep it all straight.