Read up to count bytes into buffer at offset from the PTY. The number of bytes read will be returned.