Onde o iTunes armazena informações sobre músicas ouvidas e o número de vezes?
Na versão do iTunes do Windows, essa informação está em iTunes Music Library.xml
Cada faixa na biblioteca tem entradas como:
<key>Play Count</key><integer>2</integer>
<key>Play Date</key><integer>3354642445</integer>
<key>Play Date UTC</key><date>2010-04-20T20:07:25Z</date>
...
<key>Name</key><string>Into Blue</string>
<key>Artist</key><string>Aethera</string>
<key>Composer</key><string>J. Deere</string>
<key>Album</key><string>The Gaelic Mystery</string>
Então essa faixa foi tocada duas vezes. A contagem de reproduções só é atualizada se você tocar toda a faixa do início ao fim.
Sobre os arquivos da biblioteca do iTunes
About the iTunes Library.itl file
The iTunes Library.itl file is a database of the songs in your library and the playlists that you've created. Some song-specific data is saved in this file. If you delete this file, iTunes creates a new, empty copy the next time that you open it. Your playlists, song ratings, comments, or other information is lost. The iTunes Library.itl file is used only by iTunes, and is the only one backed up by Time Machine on OS X.
New versions of iTunes sometimes include enhancements to the iTunes library. When you open a new version of iTunes, iTunes updates your existing library to the new format and places a copy of the old library in the Previous Libraries folder.
About the iTunes Library.xml file
The iTunes Library.xml file contains some, but not all, of the same information that's stored in the iTunes Library.itl file. The purpose of the iTunes Library.xml file is to make your music and playlists available to other applications on your computer, such as iPhoto, Garageband, iMovie, and third-party software, in OS X Mountain Lion and earlier. These applications use this file to make it easier for you to add music from your iTunes library to your projects.
If you're using OS X Mountain Lion or earlier or a third-party app that uses the XML file, you need to enable Legacy library XML support:
- Open iTunes.
- From the menu bar at the top of your computer screen, choose iTunes > Preferences.
- Click the Advanced tab.
- Select "Share iTunes Library XML with other applications."
Fonte Sobre os arquivos da biblioteca do iTunes