Approach to creating a user profile in music web application
The first question is: what to do you want to see in user profile?


Top-10 tracks, top-10 artist by user?
How many tracks/artists a user listens to in a day on average (may be, in last month)?


May be you want to get some general information related to the whole user base:


Which artist/track is the most popular among users from different countries (top-N of them)?


The second: you store and want to make aggregates for millions of records. It's not a text file deal. Make a database. Create a table id-user | country | id-artist | id-track. Create another tables with some aggregates from #1, update it regularly and diplay on the front end.