I understand it this way. {x 丨 x > 2} means that X is an element in the set, but it is followed by the condition x > 2 on the right, that is, {x 丨 x > 2} means the set of all X satisfying the condition X > 2. This is naturally infinite.
N is the set of all integers ≥0 and an infinite set.