I know how to represent the sentence “there is exactly one person that is happy”,
∀y∀x((Happy(x)∧Happy(y))→(x=y))
Edit: ∃x∀y(y=x↔Happy(y)) (NOW, I actually know how to represent it)
Where x and y represent a person.
However, my problem is that I can’t figure out how to say “there are exactly 3 people that are happy” in predicate logic.
Correction: $$∃x \,∀p\;\Big( p=x \leftrightarrow\text{Happy}(p) \Big).$$
(Note that even though this sentence looks simpler than Tom's suggestion, they are actually logically equivalent to each other.)
$$∃x ∃y ∃z \,∀p\;\bigg(x\neq y\land y\neq z\land z\neq x \land \Big( (p=x\lor p=y\lor p=z ) \leftrightarrow\text{Happy}(p) \Big)\bigg).$$