Cannot do it with JSON as there's no way to get the track number when there's no property. I don't bother with doing that format. But I believe the html code has the track numbers. But I don't have time to look at this.
I've requested a count inside an array loop for situations where there's no track numbers in json so you can plus one this thread.