Instead of
$total_customers = $wpdb->get_var( $wpdb->prepare( “SELECT COUNT(*) FROM %s”, $table_name ) );
Write
$total_customers = $wpdb->get_var( $wpdb->prepare( “SELECT COUNT(*) FROM $table_name” ) );
The printf replacements are meant for value replacement to prevent injection, not to replace tablenames.