How to get view count of every page on site and add that (increasing) number to Dashboard Widget

You can generate page views count without any plugins. What you need to do is create a post meta key for each post (of course automatically) and increase the counter of this post meta key on each post/page load or visit.

So here is the function to create a post meta key post_views_count for each post and calling this function on each page/post load will increase post count by one.

// Post views function
function wps_set_post_views( $postID ) {
    $count_key = 'post_views_count';
    $count = get_post_meta( $postID, $count_key, true );
    if ( $count=='' ){
        $count = 0;
        delete_post_meta( $postID, $count_key );
        add_post_meta( $postID, $count_key, '0' );
    } else {
        $count++;
        update_post_meta( $postID, $count_key, $count );
    }
}

Now you need to call this function from single.php and page.php. Just paste this on these pages. If you use W3 Total Cache or similar cache plugin then you will need to use fragment caching to make sure function is called on each page load.

<?php wps_post_views( get_the_ID() ); ?>

This will set you post/page views and increase counter by one on each visit.

Now if you want to add post views on admin column then you can add a column for post views like this.

// Get post views
function wps_get_post_views( $postID ) {
    $count_key = 'post_views_count';
    $count = get_post_meta( $postID, $count_key, true );
    if ( $count=='' ){
        delete_post_meta( $postID, $count_key );
        add_post_meta( $postID, $count_key, '0' );
        return "0 View";
    }
    return $count.' Views';
}

// Add to admin post column
add_filter( 'manage_posts_columns', 'posts_column_views' );
add_action( 'manage_posts_custom_column', 'posts_custom_column_views', 5, 2 );
function posts_column_views( $defaults ) {
    $defaults['post_views'] = __('Views');
    return $defaults;
}
function posts_custom_column_views( $column_name, $id ){
  if ( $column_name === 'post_views' ) {
        echo wps_get_post_views( get_the_ID() );
    }
}

That’s it. All these functions will go in functions.php file except the code for single.php and page.php to call function to set post views.