Write a callback function that increments the global variable count every time the store receives an action, and pass this function in to the store.subscribe() method. You’ll see that store.dispatch() is called three times in a row, each time directly passing in an action object. Watch the console output between the action dispatches to see the updates take place.
If you want to pass a callback to store.subscribe, you do it like:
store.subscribe(callback); //callback is a function which increments count