5. Given the function
$$
f(x)=\left\{\begin{array}{ll}
2 x^{2}+4 x+1, & x<0 ; \\
\frac{2}{\mathrm{e}^{x}}, & x \geqslant 0 .
\end{array}\right.
$$

Then the number of pairs of points on the graph of $y=f(x)(x \in \mathbf{R})$ that are symmetric with respect to the origin $O$ is ( ).
(A) 0
(B) 1
(C) 2
(D) 3
5. C.

The graph of the function $y=f(x)$ is shown as the solid line in Figure 4.

Construct the graph of $y=\frac{2}{\mathrm{e}^{x}}(x \geqslant 0)$ symmetric to the origin $O$ (dashed line), its analytical expression is
$$
g(x)=-\frac{2}{\mathrm{e}^{-x}}(x \leqslant 0) .
$$

Since $f(-1)=-1<-\frac{2}{\mathrm{e}}=g(-1)$, therefore, the graph of $f(x)=2 x^{2}+4 x+1(x<0)$ intersects the graph of $g(x)=$ $-\frac{2}{\mathrm{e}^{-x}}(x \leqslant 0)$ at two distinct points.

Thus, the graph of $y=f(x)(x \in \mathbf{R})$ has exactly two pairs of points that are symmetric with respect to the origin $O$.