sample space S is the set of all possible outcomes of an experiment. It could be continuous or distinct. equally likely outcomes Some sample spaces have equally likely outcomes: coin flip flipping two coins rolling a fair die If we have equally likely outcomes, P(outcome) = \frac{1}{S}. If your sample space has equally likely outcomes, the probability is juts counting:
\begin{equation} P(E) = \frac{count(E)}{count(S)} \end{equation}
Whenever you use this tool, you have to think about whether or not your outcomes are equally likely. For instance, the “sum of two dice rolling” is NOT equally likely. Distinct counting makes things equally likely.