Magnetic measurements from the MIRACLE network are used to identify substorms during solar cycles 22 and 23, from 1993 to 2004. For the first time substorm activity is examined over a complete solar cycle. In this study more than 5000 substorms are identified and their interplanetary drivers, such as high-speed streams and magnetic clouds, are examined. A new parameter called substorm number Rsu is formed based on substorm peak amplitudes. The substorm number measures magnetic activity of the Earth's magnetosphere in a way analogous to how sunspot number Rz estimates the level of Sun's magnetic activity. Analysis of OMNI2 (WIND, ACE, Cluster, Geotail, IMP-8) interplanetary measurements indicate that high speed streams (HSS, with Sun-to-Earth velocities over 700~km/s) are the main drivers of the terrestrial substorms. Although the magnetic clouds produce the most extreme energy inputs to the Earth's magnetosphere and ionosphere over short intervals of a few days, the high-speed stream intervals dominate the average energy input over the course of the solar cycle.