4. Let $k$ be the number of real roots of the equation $|x|^{\frac{1}{4}}+|x|^{\frac{1}{2}}-\cos x=0$, then $k=$
$f(x)=|x|^{\frac{1}{4}}+|x|^{\frac{1}{2}}$ is an even function, and it is increasing on $[0,+\infty)$, with $f(0)=0, f(1)=2$. Therefore, the number of real roots $k=2$ for the equation $f(x)=\cos x$.