title: Use Observable.FromEventPattern to perform action after inactivity or count
body: <p>I have an observable stream created from an event pattern like seen below.</p>
  
  <pre><code>var keyspaceStream = Observable.FromEventPattern&lt;RedisSubscriptionReceivedEventArgs&gt;(
              h =&gt; keyspaceMonitor.KeySpaceChanged += h,
              h =&gt; keyspaceMonitor.KeySpaceChanged -= h);
  </code></pre>
  
  <p>What I want to do is subscribe to the stream and execute a method when there has either been 10 seconds of inactivity (no events have occurred) or 100 events have fired without the method having been executed. This is to avoid scenarios when events are fired every 5 seconds and the onNext method is never called. </p>
  
  <p>How can I accomplish this? I know how to do the first part (see below) but I can't figure out how to do the counting logic. Note that I already know how to subscribe to the stream.</p>
  
  <pre><code>var throttledStream = keyspaceStream.Throttle(TimeSpan.FromSeconds(10));
  </code></pre>
  
  <p>Any help would be much appreciated! Thank you.</p>