prefix."apt_appointments"; $staff_table = $wpdb->prefix."apt_staff"; $clients_table = $wpdb->prefix."apt_clients"; $payment_table = $wpdb->prefix."apt_payment"; $coupon_table = $wpdb->prefix."apt_coupons"; $services_table = $wpdb->prefix."apt_services"; ?>

get_results( "select * from $appointments_table where status='approved'"); $approved_appointments= count($approved_appointment_details); ?>
get_results( "select * from $appointments_table where status='pending'"); $pending_appointments= count($pending_appointment_details); ?>
get_results( "select * from $appointments_table where status='cancelled'"); $cancelled_appointments= count($cancelled_appointment_details); ?>
get_results( "select * from $appointments_table where status='completed'"); $completed_appointments= count($completed_appointment_details); ?>

get_col( "Select id from $clients_table"); $regular_clients= count($customer_email_id); ?>
get_col( "Select id from $services_table"); $total_services= count($service_id); ?>
get_col( "Select id from $appointments_table"); $total_appointments= count($appointments); ?>