The prime supplier of energy for Earth is the Sun.
Any change in the irradiation coming from the sun has an immediate effect here on Earth.
The amount of energy irradiated is depending on the number of sunspots on the surface of the sun: The more sunspots emerge, the higher the irradiation.
This association of solar variations and climatic cooling is known for long.
This is not related to the number of CME’s ejected from the sun.
So a measurement of the number, size and strength of the sunspots over time is in direct correlation to the climate on Earth. Since many centuries the sunspots were measured and counted.
Only the visible, bigger and therefore easily countable sunspots were included in these observations.
An example for the correlation is the known “Little Iceage” in medieval times:
Sun spot activity during the “Maunder” solar minimum. From 1650 to 1700 virtually no sun spots were observed. It resulted into a global cooling, causing devastating famines in Europe.
The Maunder Minimum were preceded by the Sporer Minimum and cooling and followed by the Dalton Minimum and cooling from 1790-1820, then the 1880-1915 solar minimum and cooling and finally the 1945-1977 solar minimum and cooling.
Remember, the relation between the sunspots and climate are based on the number of bigger, visible sunspots from Earth.
For these early correlations the few hundreds of sunspots were used, which at that time were detectable from Earth.