Both have an infinity of solutions. And I'm guessing they have the same cardinality of solutions?
If cos(x)=0 then let y=sqrt(x) if x>0 or y=-sqrt(-x) if x<0. Then cos(y^2)=0.
Since there's a 1:1 mapping between these x's and these y's, the two sets have the same cardinality.