12. Given that $\triangle A B C$ is an obtuse triangle, with its longest side $A C$ having a point $P (P$ not coinciding with $A$ or $C)$, a line $l$ is drawn through $P$, such that the triangle formed by $l$ intersecting $\triangle A B C$ is similar to the original triangle. Then, such a line $l$ can be drawn $\qquad$ times.
12.2 or 3.

As shown in Figure 11, where
$$
\begin{array}{l}
\angle A B P_{1}=\angle C, \\
\angle C B P_{2}=\angle A .
\end{array}
$$

When point $P$ is located between point $A$ and $P_{1}$ (including point $P_{1}$) or between point $C$ and $P_{2}$ (including point $P_{2}$), there are 3 lines that satisfy the conditions;

When point $P$ is located between point $P_{1}$ and $P_{2}$ (excluding points $P_{1}$ and $P_{2}$), there are 2 lines that satisfy the conditions.