I believe that both have infinite number of solutions. However, when looking into the chart of sin(x) and sin(x^2), it is quite obvious, that both the infinities have different cardinality.
I'd say that the number of solutions for cos(x)=0 has same cardinality as the set of all natural numbers. However, for the cos(x^2)=0, the cardinality would be as the set of all real numbers. At least, it is not greater.
both have an infinite number of solutions. cos(x^2) = 0 has broader distribution of solutions compared to the linear and equally spaced solutions of cos(x) = 0. cos(x^2) = 0 is more dense in unique values.