You didn't make a backup before doing a major software installation????? 😮 Anyway, upgrading OS shouldn't do anything to your data files including iTunes, unless you (unnecessarily) wiped the whole hard drive as part of this.
Downloading (using iOS or computer) past purchases from the App Store, iBookstore, and iTunes Store - http://support.apple.com/kb/ht2519 - enabled with iTunes 10.3 and newer; not all media formats are available in all countries (see: iTunes in the Cloud, iTunes Match, and iTunes Radio availability by country - http://support.apple.com/kb/HT5085); apps, books (not audiobooks), music, t.v. shows, and movies (some - not all studios have permitted this). Downloading previously purchased movies and TV shows requires iTunes 10.6 or later. Discontinued items not available. For items not included in the iCloud list (e.g., ringtones, audiobooks, alert tones), or locations or computer systems where iCloud is not (yet?) available, you only get one download per fee paid. Apple recommends, "... back up your iTunes library. " (http://support.apple.com/kb/ht2519). This will simply recover media, it will not restore your playlists or ratings which are in the files you need to back up.