If you change
foreach($tracklist as $track) {
echo $track . "<br>"; // Displays "12" (there are 12 tracks on this album)
}
to
foreach($tracklist as $key => $value ) {
echo "$key => $value ('tracklist')<br />"; // Displays "12" (there are 12 tracks on this album)
}
then what you get?