Music on iPhone not showing in iTunes library
My iPhone 6 (iOS 8.4.1) has 3632 songs on it. All music was purchased through iTunes. My iTunes library (12.2.2.25) on my MacBook Air (10.10.5, Mid 2011) shows only 697 songs. iCloud Music Library is turned off on my Mac. My iPad Air (8.4.1, M) shows only 308 songs. It used to have the same number of songs as my iPhone until I recently synced it with iTunes. Now I'm afraid to sync my iPhone with iTunes. Why do the songs counts differ between my devices and iTunes? How do I get all the 3632 songs on my iPhone back on my iPad and in my iTunes library?
MacBook Air (11-inch Mid 2011), OS X Yosemite (10.10.5)