How to create visit counter when a website load

I need to create a counter for a website. Every time the visitor Number Increasing when the page load and save this counter on server. In stackoverflow, I have searched many answer with this regard but not succeed.

Is there a full work around code in html, javascript, php etc. ?