11. (20 points) Let the sequence of rational numbers $\left\{a_{n}\right\}$ be defined as follows:
$a_{k}=\frac{x_{k}}{y_{k}}$, where $x_{1}=y_{1}=1$, and
if $y_{k}=1$, then $x_{k+1}=1, y_{k+1}=x_{k}+1$;
if $y_{k} \neq 1$, then $x_{k+1}=x_{k}+1, y_{k+1}=y_{k}-1$.
How many terms in the first 2011 terms of this sequence are positive integers?
11. The sequence is
$$
\frac{1}{1}, \frac{1}{2}, \frac{2}{1}, \frac{1}{3}, \frac{2}{2}, \frac{3}{1}, \cdots, \frac{1}{k}, \frac{2}{k-1}, \cdots, \frac{k}{1}, \cdots \text {. }
$$

Group it as follows:
$$
\begin{array}{l}
\left(\frac{1}{1}\right),\left(\frac{1}{2}, \frac{2}{1}\right),\left(\frac{1}{3}, \frac{2}{2}, \frac{3}{1}\right), \cdots, \\
\left(\frac{1}{k}, \frac{2}{k-1}, \cdots, \frac{k}{1}\right), \cdots
\end{array}
$$

Let any number in the $k$-th group be $\frac{b}{a}(a, b \in \mathbf{N}_{+})$. Then $a+b=k+1$.
$$
\begin{array}{l}
\text { Hence } \frac{b}{a} \in \mathbf{N}_{+} \Leftrightarrow b=a t\left(t \in \mathbf{N}_{+}\right) \\
\Leftrightarrow k+1=(t+1) a .
\end{array}
$$

Thus, each positive integer term $\frac{b}{a}$ in the $k$-th group corresponds one-to-one with a divisor of $k+1$ greater than 1.

Therefore, the number of positive integer terms in the $k$-th group is the number of distinct divisors of $k+1$ greater than 1.
By calculation, the first 63 groups contain
$$
\begin{array}{l}
1 \times 18+2 \times 4+3 \times 20+4 \times 1+5 \times 10+ \\
6 \times 1+7 \times 6+8 \times 1+9 \times 1+11 \times 1 \\
=216
\end{array}
$$

positive integer terms.
Notice that
$$
1+2+\cdots+63=2016 \text {. }
$$

Thus, the 2011th term of the sequence belongs to the 63rd group, and is the 6th number from the end.
Therefore, the terms in the 63rd group that do not belong to the first 2011 terms are
$$
\left(\frac{59}{5}, \frac{60}{4}, \frac{61}{3}, \frac{62}{2}, \frac{63}{1}\right) \text {, }
$$

among which, there are three integers.
In summary, the first 2011 terms of the sequence contain 213 terms that are positive integers.