Are number counters on websites ever linked to anything, or are the numbers all hardcoded in the html?

Can a website have a number counter linked to something, like if they want to show the real-time count of their twitter followers?

From what I’ve searched, the numbers in number counters are hard-coded (ie https://elfsight.com/number-counter-widget/ or https://codepen.io/shivasurya/pen/FatiB).

Are there any websites whose number counters are linked to something, so I can look into them. Or is there a method one could recommend to do this?