playlist: track count in the JSON API
transcode.sh: fix path detection