Nerd alert: I guess there really is a class M planet.
I think there is an equation used to predict the number of Class M planets in the galaxy. Then again, I haven’t seen a Trek classic episode in a long time, and may not be remembering correctly.
But as far as possibility of life elsewhere, we shouldn’t limit ourselves to carbon based life. There was one Star Trek episode which had a silicon based life form.