As poster wrote in this answer in July 2023:
You cannot get the total number of tracks in the websource result window with the discogs-script. The number of tracks is not provided from Discogs at this point, it is only available when you query the release.