“The Simpsons” hits a milestone Sunday with its 500th episode, but it has also quietly managed to break another record en route: the most original musical scores ever composed for a primetime series.

“Gunsmoke” ran 635 episodes, but less than a third of them were scored with original music; “Law & Order,” like “Gunsmoke,” also ran for 20 years, but that show ended after 456 episodes.

Alf Clausen has written 483 of those 500 scores, starting with the show’s first Halloween episode in October 1990. He’s won two Emmys and garnered another 21 nominations for his “Simpsons” songs and scores. “It really is a challenge. I work hard not to repeat myself,” Clausen said.

The overall “Simpsons” statistics, as tallied by music editor Chris Ledesma (who has been on “The Simpsons” from the start), are equally impressive: nearly 15,000 individual pieces of music and more than 28,000 “takes” or recordings over the show’s 23 seasons.

And every episode, unlike most series these days, has featured an orchestra of about 35 players. Vince Trombetta, president of Local 47 of the American Federation of Musicians, dropped by Clausen’s recording session Feb. 3 in Glendale to present him with a plaque for his “exceptional work over the past 22 years.”

Clausen credited “Simpsons” creator Matt Groening for insisting on real musicians, not synthesized scores, from the beginning. Clausen, whose other credits include “Moonlighting” and the sitcom “Alf” (“no relation,” he quips), said he will stay with “The Simpsons” to its end.

“I have decided to ride this stage into the sunset,” he said.