The documentation for the Python musicbrainz2 library tells me that this is how I search for a release by disc id:
>>> import musicbrainz2.webservice as ws
>>> q = ws.Query()
>>> filter = ws.ReleaseFilter(discId='8jJklE258v6GofIqDIrE.c5ejBE-')
>>> results = q.getReleases(filter=filter)
>>> results[0].score
100
>>> results[0].release.title
u'Under the Pink'
But for a double CD I get the same release (as it should be) but different tracks when I search for the disc ID for the two CDs. This is also as it should be, but I don't see a way to get the disc number from the result of the query. Is it there somewhere? I think it is there in the XML, as a "medium".