realtime counter design