[proofplan]
We use the [Hodge decomposition](/theorems/2745) of a compact Kähler manifold to compute $b_1(X)$ and $b_2(X)$ by summing Hodge numbers along total degrees $1$ and $2$. Hodge symmetry identifies the conjugate summands and gives the two stated dimension formulas. For $b_2^+(X)$, we decompose real degree-two cohomology into the Kähler line, the real part of $H^{2,0}(X)\oplus H^{0,2}(X)$, and the primitive real $(1,1)$ part; the Hodge-Riemann bilinear relations give positive definiteness on the first two pieces and negative definiteness on the primitive $(1,1)$ piece. The parity conclusions then follow immediately from the formulas.
[/proofplan]
[step:Sum the Hodge decomposition in degrees one and two]
Let
\begin{align*}
H^{p,q}(X)\subset H^{p+q}(X;\mathbb C)
\end{align*}
denote the Hodge summand of type $(p,q)$ furnished by [[Hodge Decomposition for Compact Kähler Manifolds](/theorems/8066)][citetheorem:8066]. Since $X$ is compact Kähler, the same theorem gives, for every $k\ge 0$,
\begin{align*}
H^k(X;\mathbb C)=\bigoplus_{p+q=k}H^{p,q}(X).
\end{align*}
The canonical extension of scalars identifies $H^k(X;\mathbb C)$ with $H^k(X;\mathbb R)\otimes_{\mathbb R}\mathbb C$, so
\begin{align*}
b_k(X)=\dim_{\mathbb C}H^k(X;\mathbb C).
\end{align*}
Therefore, in degree $1$,
\begin{align*}
b_1(X)=h^{1,0}(X)+h^{0,1}(X).
\end{align*}
In degree $2$,
\begin{align*}
b_2(X)=h^{2,0}(X)+h^{1,1}(X)+h^{0,2}(X).
\end{align*}
[guided]
The point of the [Hodge decomposition](/theorems/3941) is that it splits complex cohomology into pieces indexed by type. Since $X$ is a compact Kähler manifold, [Hodge Decomposition for Compact Kähler Manifolds][citetheorem:8066] applies directly and gives complex subspaces
\begin{align*}
H^{p,q}(X)\subset H^{p+q}(X;\mathbb C)
\end{align*}
such that
\begin{align*}
H^k(X;\mathbb C)=\bigoplus_{p+q=k}H^{p,q}(X)
\end{align*}
for every $k\ge 0$.
We also need to connect complex cohomology dimensions with the real Betti numbers. By definition,
\begin{align*}
b_k(X)=\dim_{\mathbb R}H^k(X;\mathbb R).
\end{align*}
The canonical scalar-extension map identifies
\begin{align*}
H^k(X;\mathbb R)\otimes_{\mathbb R}\mathbb C
\end{align*}
with $H^k(X;\mathbb C)$. Hence complexification preserves dimension in the sense that
\begin{align*}
\dim_{\mathbb C}H^k(X;\mathbb C)=\dim_{\mathbb R}H^k(X;\mathbb R)=b_k(X).
\end{align*}
For $k=1$, the pairs $(p,q)$ with $p+q=1$ are $(1,0)$ and $(0,1)$. Thus
\begin{align*}
H^1(X;\mathbb C)=H^{1,0}(X)\oplus H^{0,1}(X),
\end{align*}
and taking complex dimensions gives
\begin{align*}
b_1(X)=h^{1,0}(X)+h^{0,1}(X).
\end{align*}
For $k=2$, the pairs $(p,q)$ with $p+q=2$ are $(2,0)$, $(1,1)$, and $(0,2)$. Thus
\begin{align*}
H^2(X;\mathbb C)=H^{2,0}(X)\oplus H^{1,1}(X)\oplus H^{0,2}(X),
\end{align*}
and taking complex dimensions gives
\begin{align*}
b_2(X)=h^{2,0}(X)+h^{1,1}(X)+h^{0,2}(X).
\end{align*}
[/guided]
[/step]
[step:Use Hodge symmetry to simplify the first two formulas]
By [[Hodge Symmetry for Compact Kähler Manifolds](/theorems/8081)][citetheorem:8081], complex conjugation identifies $H^{p,q}(X)$ anti-linearly with $H^{q,p}(X)$. Hence
\begin{align*}
h^{p,q}(X)=h^{q,p}(X)
\end{align*}
for all $p,q$. Applying this with $(p,q)=(1,0)$ gives
\begin{align*}
b_1(X)=h^{1,0}(X)+h^{0,1}(X)=2h^{1,0}(X).
\end{align*}
Applying it with $(p,q)=(2,0)$ gives
\begin{align*}
b_2(X)=h^{2,0}(X)+h^{1,1}(X)+h^{0,2}(X)=h^{1,1}(X)+2h^{2,0}(X).
\end{align*}
[/step]
[step:Decompose real degree-two cohomology into positive and negative Hodge-Riemann pieces]
Let $\omega$ be a Kähler form on $X$, and let
\begin{align*}
\kappa:=[\omega]\in H^2(X;\mathbb R)\cap H^{1,1}(X)
\end{align*}
be its Kähler class. Define the real intersection form
\begin{align*}
Q_X:H^2(X;\mathbb R)\times H^2(X;\mathbb R)&\to\mathbb R, &
Q_X(\alpha,\beta)&=\langle \alpha\smile\beta,[X]\rangle.
\end{align*}
Let $P_{\mathbb R}^{1,1}\subset H^2(X;\mathbb R)\cap H^{1,1}(X)$ denote the primitive real $(1,1)$ subspace
\begin{align*}
P_{\mathbb R}^{1,1}:=\{\alpha\in H^2(X;\mathbb R)\cap H^{1,1}(X):Q_X(\alpha,\kappa)=0\}.
\end{align*}
Since $X$ is connected and $\omega$ is Kähler, the class $\kappa$ is nonzero and satisfies $Q_X(\kappa,\kappa)>0$. Therefore
\begin{align*}
H^2(X;\mathbb R)\cap H^{1,1}(X)=\mathbb R\kappa\oplus P_{\mathbb R}^{1,1}.
\end{align*}
Let
\begin{align*}
V_{\mathbb R}:=H^2(X;\mathbb R)\cap\left(H^{2,0}(X)\oplus H^{0,2}(X)\right)
\end{align*}
be the real subspace underlying the conjugate pair $H^{2,0}(X)\oplus H^{0,2}(X)$. Complex conjugation identifies $H^{2,0}(X)$ with $H^{0,2}(X)$, so
\begin{align*}
\dim_{\mathbb R}V_{\mathbb R}=2h^{2,0}(X).
\end{align*}
The real Hodge decomposition in degree $2$ is
\begin{align*}
H^2(X;\mathbb R)=\mathbb R\kappa\oplus P_{\mathbb R}^{1,1}\oplus V_{\mathbb R}.
\end{align*}
By the [Hodge-Riemann bilinear relations on primitive cohomology](/theorems/8068), in the surface case the form $Q_X$ is positive definite on $\mathbb R\kappa\oplus V_{\mathbb R}$ and negative definite on $P_{\mathbb R}^{1,1}$. Equivalently, this is the degree-two surface case of [Hodge-Riemann Bilinear Relations on Primitive Cohomology][citetheorem:8068], with the complex orientation used in the definition of $Q_X$. It follows that a maximal positive-definite subspace of $H^2(X;\mathbb R)$ has dimension
\begin{align*}
\dim_{\mathbb R}(\mathbb R\kappa\oplus V_{\mathbb R})=1+2h^{2,0}(X).
\end{align*}
Thus
\begin{align*}
b_2^+(X)=1+2h^{2,0}(X).
\end{align*}
[guided]
The intersection form in degree two is the real symmetric bilinear map
\begin{align*}
Q_X:H^2(X;\mathbb R)\times H^2(X;\mathbb R)&\to\mathbb R, &
Q_X(\alpha,\beta)&=\langle \alpha\smile\beta,[X]\rangle,
\end{align*}
where $[X]\in H_4(X;\mathbb R)$ is the fundamental class determined by the complex orientation. The number $b_2^+(X)$ is, by definition, the largest possible dimension of a real subspace on which this form is positive definite.
Let $\omega$ be the Kähler form of the Kähler metric on $X$, and define its cohomology class by
\begin{align*}
\kappa:=[\omega]\in H^2(X;\mathbb R)\cap H^{1,1}(X).
\end{align*}
Because $\omega$ is positive and $X$ is connected and compact, $\kappa$ gives one distinguished real $(1,1)$ direction. More precisely, the Hodge-Riemann bilinear relations imply
\begin{align*}
Q_X(\kappa,\kappa)>0.
\end{align*}
In particular $\kappa\ne 0$, so $\mathbb R\kappa$ is a one-dimensional positive subspace.
Next define the primitive real $(1,1)$ subspace by
\begin{align*}
P_{\mathbb R}^{1,1}:=\{\alpha\in H^2(X;\mathbb R)\cap H^{1,1}(X):Q_X(\alpha,\kappa)=0\}.
\end{align*}
This is exactly the $Q_X$-orthogonal complement of the Kähler line inside the real $(1,1)$ part. Since $Q_X(\kappa,\kappa)>0$, every element $\alpha\in H^2(X;\mathbb R)\cap H^{1,1}(X)$ has a unique decomposition into its component along $\kappa$ and its primitive component:
\begin{align*}
\alpha=\frac{Q_X(\alpha,\kappa)}{Q_X(\kappa,\kappa)}\kappa+\left(\alpha-\frac{Q_X(\alpha,\kappa)}{Q_X(\kappa,\kappa)}\kappa\right).
\end{align*}
The second term lies in $P_{\mathbb R}^{1,1}$ because its pairing with $\kappa$ is
\begin{align*}
Q_X\left(\alpha-\frac{Q_X(\alpha,\kappa)}{Q_X(\kappa,\kappa)}\kappa,\kappa\right)=Q_X(\alpha,\kappa)-\frac{Q_X(\alpha,\kappa)}{Q_X(\kappa,\kappa)}Q_X(\kappa,\kappa)=0.
\end{align*}
Thus
\begin{align*}
H^2(X;\mathbb R)\cap H^{1,1}(X)=\mathbb R\kappa\oplus P_{\mathbb R}^{1,1}.
\end{align*}
Now define the real subspace coming from the conjugate Hodge types $(2,0)$ and $(0,2)$:
\begin{align*}
V_{\mathbb R}:=H^2(X;\mathbb R)\cap\left(H^{2,0}(X)\oplus H^{0,2}(X)\right).
\end{align*}
Complex conjugation carries $H^{2,0}(X)$ anti-linearly onto $H^{0,2}(X)$ by [Hodge Symmetry for Compact Kähler Manifolds][citetheorem:8081]. Therefore the real subspace fixed by conjugation inside $H^{2,0}(X)\oplus H^{0,2}(X)$ has real dimension twice the complex dimension of $H^{2,0}(X)$:
\begin{align*}
\dim_{\mathbb R}V_{\mathbb R}=2h^{2,0}(X).
\end{align*}
Combining this with the real form of the Hodge decomposition gives
\begin{align*}
H^2(X;\mathbb R)=\mathbb R\kappa\oplus P_{\mathbb R}^{1,1}\oplus V_{\mathbb R}.
\end{align*}
It remains to determine the sign of $Q_X$ on these three pieces. The surface case of [Hodge-Riemann Bilinear Relations on Primitive Cohomology][citetheorem:8068], with the complex orientation used to define $[X]$, says that $Q_X$ is positive definite on the Kähler line $\mathbb R\kappa$, positive definite on the real subspace $V_{\mathbb R}$ coming from $H^{2,0}(X)\oplus H^{0,2}(X)$, and negative definite on the primitive real $(1,1)$ part $P_{\mathbb R}^{1,1}$. Hence the positive directions are precisely the directions in
\begin{align*}
\mathbb R\kappa\oplus V_{\mathbb R}.
\end{align*}
No vector in $P_{\mathbb R}^{1,1}$ can be added to a positive-definite subspace as an additional positive direction, because $Q_X$ is negative definite there. Therefore a maximal positive-definite subspace has dimension
\begin{align*}
\dim_{\mathbb R}(\mathbb R\kappa\oplus V_{\mathbb R})=1+2h^{2,0}(X).
\end{align*}
This proves
\begin{align*}
b_2^+(X)=1+2h^{2,0}(X).
\end{align*}
[/guided]
[/step]
[step:Read off the parity consequences]
The formula
\begin{align*}
b_1(X)=2h^{1,0}(X)
\end{align*}
shows that $b_1(X)$ is even. The formula
\begin{align*}
b_2^+(X)=1+2h^{2,0}(X)
\end{align*}
shows that $b_2^+(X)$ is odd. This proves all asserted formulas and parity statements.
[/step]