Returns the number of remaining input events. If events remain on input FIFO of user-space, function returns the number of events on it. If fetch_sequencer argument is non-zero, this function checks the presence of events on sequencer FIFO via select syscall. When events exist, they are transferred to input FIFO, and the number of received events are returned. If fetch_sequencer argument is zero and no events remain on input FIFO, function simplly returns zero.