So I have been looking at this question: How to convert an English sentence that contains "Exactly two" or "Atleast two" into predicate calculus sentence? And the way I would do this didn't really show up there.
So I would like to write "Exactly two..." like this:
Let $P(x)$ be a predicate, so to say exactly two terms satisfy $P$ I would write: $$\exists x \exists!y((x \ne y) \wedge P(x) \wedge P(y))$$
Now, this would ensure that $x \ne y $ and since $=$ is an equivalence relation, it ensures that there is only one such $x$ and $y$.
Would this be a right way to write it? I'm not a mathematican, so I was unsure If I can provide this as an answer, but it got me curious as my notation is much shorter than the ones proposed in the linked question.