Add test case for scheduler.addPeriodicEvent.
schedule: Add the 'count' argument.