PROBLEM SOLVED
I disabled the wp-statistics plugin.
What version? That code was removed Nov 15, 2017.
@royprince
Please Update WP-Statistics To Latest Version.
It seems you are using a very old version
13.0.4 looks ok now to me, everything is fine and visitors are counted
Problem solved by removing the plugin.
The latest version has solved this issue according to the plugin author.