Revert "make write() consistently return an Int byte count. fixes #1701"

This reverts commit 8dd6d082fcb40610b22189342e24eff7ee7b1217.