Move the online counting to updateOtherData() instead of being a piece of global state.