implement api count refreshing via websocket