This is not how it should work.
We’d suggest using a different counting method (PHP/REST API/JS). Maybe one of those methods don’t work properly on your site.

Another potential issue could be related to caching. Depending on the plugin used there could be multiple JS caching/defering/minification options that affect the way Javascript is executed. We’d try changing those options and checking if it makes a difference.

Hope this helps,