(5) The number of irrational numbers $x$ that make the value of $\frac{x+1}{x^{2}-3 x+3}$ an integer is ( ).
(A) 0
(B) 2
(C) 4
(D) 6
(5) Let $\frac{x+1}{x^{2}-3 x+3}=k$, then
$$
k x^{2}-(3 k+1) x+3 k-1=0 .
$$

If $k=0$, then $x=-1$; if $k \neq 0$, by $\Delta \geqslant 0$, we get
$$
\frac{5-2 \sqrt{7}}{3} \leqslant k \leqslant \frac{5+2 \sqrt{7}}{3},
$$

then $k$ can only take $0, 1, 2, 3$. When $k=1$, $x=2 \pm \sqrt{2}$; when $k=2$, $x=1, \frac{5}{2}$; when $k=3$, $x=2, \frac{4}{3}$. Therefore, the irrational numbers are only $x=2 \pm \sqrt{2}$. Hence, the answer is B.