sunspots and global warming
Sunspots activity and global warming are not related.
It turns out the number of sunspots is not linked with
global av temps. While the statistics show there's nothing
in the data that could not be explained by just "luck" the
weak correlation anyway appears to be -ve. The months with
more sunspots seem to relate to the cooler months in the global record.
The plot as as follows:
Sunspots

The data comes from the Royal Belgian Observatory. While the dataset
goes back to 1700 we've just used the numbers over the Sat era here
from 1975.
Global temperature

This is NASA's global temp index. It's the calculated avg global
temperature relative to their 1950s baseline in 1/100th deg C.
Relating sunspots with global temperature
We run a time-series (ARMA 1,1) regression with all the bells and
whistles to try to establish any underlying link.
The first plot shows sunspot numbers along the X and global temps along
the Y. The stats program find no valid link. The R2 is tiny (the
so-called "explanation power" of the best linear model it can find)
and the Prob the beta is -ve is only around 65%. For stats heads this
is equivalent to a 50/50 coin toss. There is no good reason to believe
the model tracks the data sets better than just luck.
But if you press the point there are better odds the relationship
is -ve. I.e. more sunspots LOWER the global temp in the same month.
(Maybe by causing more clouds).

To give the model a second chance to come good we take the logs of
the sunspot numbers. Maybe the relationship is logarithmic, not linear.
But, no, that also finds low R2 and Prob(beta) +ve or -ve is almost 50/50
so "no real relationship".