Write up to count bytes from buffer at offset to the standard error stream. The number of bytes written will be returned.