Write up to count bytes into buffer at offset to the standard input stream. If the standard input stream is set to the TTY, this is equivalent to writeTty. The number of bytes written will be returned.