Added interval and count options to setKeepAlive.