Returns a function that is supposed to be executed count times, delegating any calls to the provided stubFn function. Naming your stubFn closure will help to properly diagnose errors that are being thrown: