Run a counter on a separate thread from the UI thread