I'm not sure of teh total run of Newhart, but its first season was widely considered the weakest, then they figured it out and did some recasting. The finale is in the pantheon and the last season has my favorite episode (when the reform their old street gang the Holligans).