add getNumberOfPieces to XML Reader, fix progress
The XMLUnstructuredDataReader had no way of querying thenumber of pieces in the file.
The XMLUnstructuredDataWriter was not correctly reporting progress when writing pieces. It reported 100% progress after the first piece.