Optimize countShares to do as little work as possible since it runs very often
Update live share counter more often when page visible, and less often when not