2. The number of isosceles triangles with integer side lengths and a perimeter of 21 is ().
(A) 4
(B) 5
(C) 6
(D) 7
2. B

Translate the text above into English, please retain the original text's line breaks and format, and output the translation result directly.