Added use of Source class

The framework now uses a Source class to determine how many
events should be processed.
Created a CountEventsSource to replace the old way of looping over
a set number of events.
Merge pull request #2 from Dr15Jones/addSourceClass

Added use of Source class
Reviewed and merged