6. Given that the three sides of a triangle $a, b, c$ are all integers, and $a \leqslant b < c$. If $b=7$, then the number of such triangles is ( ).
(A) 21
(B) 28
(C) 49
(D) 54
6. A.

When $a=2$, there is 1; when $a=3$, there are 2; when $a=4$, there are 3; when $a=5$, there are 4; when $a=6$, there are 5; when $a=7$, there are 6. In total, there are 21.