save/restore number of streams