How to show post views on single.php page?

Your implementation of the getPostViews function looks fine, and I don’t see an issue having that inside your single.php or breadcrumbs.php.

However, I would move both functions into your functions.php (more info here) and rather than calling setPostViews inside single/breadcrumbs.php, I would attach it to a WordPress action.

<?php
//...inside your functions.php...

add_action( 'init', 'fa_setpostviews' );
function fa_setpostviews() {
    global $post;

    // Do not continue if we do not have a post ID
    if ( ! isset( $post->ID ) ) {
        return;
    }

    // Do not continue if the user is not logged in
    if ( ! is_user_logged_in() ) {
        return;
    }

    // Make sure the user is on a single post.
    if ( ! is_single() ) {
        return;
    }

    /*
     * Note! The above if statements could be combined into one.
     */

    $postID = $post->ID;

    $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 {
        if ( ! isset( $_COOKIE['wpai_visited_ip'] ) ) {
            $count ++;
        }

        update_post_meta( $postID, $count_key, $count );

        $visit_ip_addr = $_SERVER['REMOTE_ADDR'];
        setcookie( 'wpai_visited_ip', $visit_ip_addr, time() + ( 60 * 1 ) );

    }
}

The above function checks if the user is logged in, if the user is on a single post page and then executes the count script as before.

Note: This is on the init hook, which may not be the best hook for your uses. Init is called multiple times and you may want to hook into wp instead. See more here on hooks and actions: https://codex.wordpress.org/Plugin_API/Action_Reference