Below is the list of tables from the database along with their columns and datatype. Need to generate an accurate SQL query for the question.
Only use the columns present in the respective table. Only use the columns which are required to generate the SQL query. Only use table joins if required and not otherwise.

### Tables ###
TABLE: CREATE TABLE Rent_Arrears ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER )
TABLE: CREATE TABLE Electoral_Register ( electoral_register_id INTEGER, cmi_cross_ref_id INTEGER )
TABLE: CREATE TABLE Business_Rates ( business_rates_id INTEGER, cmi_cross_ref_id INTEGER )
TABLE: CREATE TABLE Council_Tax ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER )
TABLE: CREATE TABLE Parking_Fines ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER )
TABLE: CREATE TABLE Customer_Master_Index ( master_customer_id INTEGER, cmi_details VARCHAR(255) )
TABLE: CREATE TABLE CMI_Cross_References ( cmi_cross_ref_id INTEGER, master_customer_id INTEGER, source_system_code CHAR(15) )
TABLE: CREATE TABLE Benefits_Overpayments ( council_tax_id INTEGER, cmi_cross_ref_id INTEGER )

### Question ###
what are the details of the cmi masters that have the cross reference code 'Tax', and count them by a bar chart

### Accurate SQL ###

SELECT cmi_details, COUNT(cmi_details) FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax' GROUP BY cmi_details