4. Given an isosceles triangle $\triangle A B C$ with side lengths $a$, $b$, and $c$ all being integers, and satisfying $a+b c+b+c a=24$. Then the number of such triangles is $\qquad$.
4.3.
$$
\begin{array}{l}
\text { Since } a+b c+b+a a \\
=(a+b)(c+1)=24=12 \times 2=8 \times 3=6 \times 4, \text { and }
\end{array}
$$
$\triangle A B C$ is an isosceles triangle, so the length of the base can only be $c$.
Thus, there are 3 triangles that satisfy the conditions:
$$
c=1, a=b=6 ; c=2, a=b=4 ; c=3, a=b=3 \text {. }
$$