Star Trek had (according to wikihahahahahapedia) 80 episodes. IMO, its greatest success was in syndication. IIRC, Gene Roddenberry was absolutely desperate to get that third season (even if it kinda sucked) in order to make syndication. He got it, and made history.
Also note Star Trek had a corporate takeover in the middle of its run. It was Desilu, but Ball and Arnaz sold it. The last season was most likely done after the takeover.