I have some modest experience with JS although for this case, there is no solid way to do this without a access to some sort of database using a language like PHP;
Your method uses LocalSessionStorage which is dependent on someone not clearing the cache and will always default to 1 for a first time visitor. Additionally, it only looks at the current page (blog) views and not the actual number of visits to the article page itself. Your method will however work well on the individual article page
Basically what I am saying is that this functionality cannot be implemented on the main blog/articles page since there is no way (not natively at least) to fetch the number of visits to a particular article and the display it on the main page.
I agree with you but i use this method of JS as in the front page and i cannot embed the View.php in my site data so, even if i make changes on the code it will be the same in the single post >>>
Maybe you this trick But you can try with this code embed in single post !!!