Relation Between Magnetic Storms and Solar Activity