That $X$ is Lindelof is trivial since every compact Hausdorff space is by definition also Lindelof. So the interesting part is to prove that the cardinality of $X$ is at most the cardinality of the reals.
The second part is false, there is a compact Hausdorff space of cardinality $2^{
|\Bbb R|}$ that is separable, namely the Stone-Cech compactification of the natural numbers. See Question about the cardinality of a space
See also,e.g. Theorem 3.6.12 and 3.6.14 in Richard Engelking, General Topololy (1989).
Hint. I could not think of the answer immediately, but I found the above answer when I googled:
cardinality compact Hausdorff separable space