Question about predicate logic 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.
 A: You haven't actually asserted that anyone is happy. So, You need to introduce a happy person, and then assert that anyone else who is happy is actually that person:
$$\exists x\left(\mathrm{Happy}(x)\wedge\left(\forall y\left(\mathrm{Happy}(y)\to (y=x)\right)\right)\right).$$
A: 
I know how to represent the sentence “there is exactly one person that is happy”: $$∀y∀x((\text{Happy}(x)∧\text{Happy}(y))→(x=y))$$

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.)

I can’t figure out how to say “there are exactly 3 people that are happy” in predicate logic.

$$∃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).$$
A: You can extend this simply as: if 4 people are happy then at least one is equal to the other.
$\forall x,y,z,w((Happy(x)\land Happy(y) \land Happy(z) \land Happy(w))\rightarrow(x=y \lor x=z \lor x=w \lor y=z \lor y=w \lor z=w)) \land \exists x,y,z (Happy(x)\land Happy(y) \land Happy(z) \land x\neq y \land y\neq z \land x \neq z) $
