That's a good example and just like any other problem, this could be solved in a lot of ways.
One method I could think of is this:
Let N= total number of songs in the playlist
P = number of songs that you will play (i.e. how many songs in total do you want to listen to)
K= number of songs you will keep track (you have to set this number)
- Listen to the playlist and play K songs (you have to preselect this number K).Take note of the title of all of the K songs.
- Now play the playlist again until P songs were played.
- Count the number, call it n, among the P songs played that were played in Step 1.
- Then an estimate of N = (P*K)/n
The estimate is based on an assumption that the proportion
P/N = n/k
i.e. proportion of song played = proportion of songs that were played again among those that were played before
And just like any parameter in statistics, there is a wide variety of possibly estimators for N.Could even do a Monte Carlo study on this approach.