19. The equation $\sin \left(\frac{\pi}{2} \cos x\right)=\cos \left(\frac{\pi}{2} \sin x\right)$ has ( ) roots in the interval $[0, \pi]$.
(A) 0
(B) 1
(C) 2
(D) 3
(E) 4
19. C.

Notice,
$$
\begin{array}{l}
\frac{\pi}{2} \cos x, \frac{\pi}{2} \sin x \in\left[-\frac{\pi}{2}, \frac{\pi}{2}\right] . \\
\text { Hence } \sin \left(\frac{\pi}{2} \cos x\right)=\cos \left(\frac{\pi}{2} \sin x\right) \\
\Rightarrow \frac{\pi}{2} \cos x=\arcsin \left(\cos \left(\frac{\pi}{2} \sin x\right)\right) \\
\Rightarrow \frac{\pi}{2} \cos x=\arcsin \left(\sin \left(\frac{\pi}{2}-\frac{\pi}{2} \sin x\right)\right) \\
\Rightarrow \frac{\pi}{2} \cos x=\frac{\pi}{2}-\frac{\pi}{2} \sin x \\
\Rightarrow \sin x+\cos x=1 \\
\Rightarrow x=0 \text { or } \frac{\pi}{2} .
\end{array}
$$