D'oh! The Simpsons will be back next year for Season 23! At the end of that season, they will have approximately 515 episodes. The Simpsons are the longest running comedy in television history. Law & Order would have beat out Gunsmoke, the longest running drama, if NBC had renewed it for one more season (I'm still mad about that).
But one show beats them all isn't a comedy or a drama ... it's news. Meet the Press has been aired consistently for 62 years with over 4850 episodes. Just one year behind it is the CBS Evening News. Holding the records for both the longest running drama and the longest running daytime drama is Guiding Light at 57 years.