6 Let the polynomial $P(x)=a_{0} x^{n}+a_{1} x^{n-1}+\cdots+a_{n-1} x+a_{n}$, where $n$ is a non-negative integer, $a_{0}$ is a positive integer, $a_{1}, a_{2}, \cdots, a_{n}$ are integers, and it satisfies $n+\left|a_{0}\right|+\left|a_{1}\right|+\cdots+\left|a_{n}\right|=3$, then the number of such polynomials is ( ) 
A. 4
B. 5
C. 6
D. 7
6 B. Since $a_{0}$ is a positive integer, $a_{1}, a_{2}, \cdots, a_{n}$ are integers, and
$$
n+a_{0}+\left|a_{1}\right|+\cdots+\left|a_{n}\right|=3,
$$

thus $n=0, a_{0}=3$; or $n=1, a_{0}=2$; or $n=1, a_{0}=1, a_{1}= \pm 1$, or $n=2$, $a_{0}=1, a_{1}=a_{2}=0$. Therefore, the polynomials are
$$
3, 2x, x+1, x-1, x^{2}
$$

a total of 5.