Found my own solution after bit of a trial and error. Had to add this ‘post_status’ => ‘publish’,
//user post count
public function get_user_posts_count($user_ID){
$args = array('author' => $user_ID, <strong>'post_status' => 'publish', </strong>'posts_per_page' => -1);
$the_query = new WP_Query( $args );
if ($the_query->post_count > 0){
return $the_query->post_count;
}
else{
return 0;
}
}