Example 1. The lengths of the three sides $a, b, c$ of a triangle are all integers, and $a \leqslant b \leqslant c$. If $b=10$, then the number of such triangles is ( ).
(A) 10.
(B) 55.
(C) $10^{2}$.
(D) Infinitely many.
(1990, Suzhou High School Competition)
When $b=n$, take $a=k(1 \leqslant k \leqslant n)$, and $b \leqslant c<a+b$, then $n \leqslant c<n+k$, at this time the value of $c$ has exactly $k$ possibilities, i.e., $c=n, n+1, \cdots, n+k-1$. The table is as follows:
\begin{tabular}{c|c|c|c}
\hline$a$ & $b$ & $c$ & Number of triangles \\
\hline 1 & $n$ & $n$ & 1 \\
\hline 2 & $n$ & $n, n+1$ & 2 \\
\hline 3 & $n$ & $n, n+1, n+2$ & 3 \\
\hline$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
\hline$k$ & $n$ & $n, n+1, \cdots, n+k-1$ & $k$ \\
\hline$\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ \\
\hline$n$ & $n$ & $n, n+1, n+2, \cdots, 2 n-2$, & $n$ \\
\hline
\end{tabular}

Therefore, when $b=n$, the total number of triangles that meet the conditions is $1+2+\cdots+n=\frac{1}{2} n(n+1)$. Taking $n=10$, substituting into the above formula, we get
$\frac{1}{2} \cdot 10 \cdot(10+1)=55($ triangles), so the answer is $(B)$.