attaches resultSizeEstimate to the returned stream