This is one way to do it that I've checked and it works:
$search_text = "%" . $_GET['some_text'] . "%";
$user_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM mix_library WHERE ml_setting_name LIKE %s", $search_text ) );
$search_text = "%" . $_GET['some_text'] . "%";
$user_count = $wpdb->get_var(
$wpdb->prepare(
"SELECT COUNT(*) FROM mix_library WHERE ml_setting_name LIKE %s",
$search_text
)
);
Replace variables to suit your needs.