Counter now only happens when mobile app is in foreground.