how to count amp views in wordpress

Recently I was involved in a project, more details later. The website had a theme which I re-coded from scratch and I've implemented an AJAX views count as there were issues in the past with views not counted due to the cache system.   This solution works very good. Ths is ...