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 media_types ( id INTEGER, name VARCHAR(120) )
TABLE: CREATE TABLE playlists ( id INTEGER, name VARCHAR(120) )
TABLE: CREATE TABLE invoices ( id INTEGER, customer_id INTEGER, invoice_date TIMESTAMP, billing_address VARCHAR(70), billing_city VARCHAR(40), billing_state VARCHAR(40), billing_country VARCHAR(40), billing_postal_code VARCHAR(10), total NUMERIC(10,2) )
TABLE: CREATE TABLE invoice_lines ( id INTEGER, invoice_id INTEGER, track_id INTEGER, unit_price NUMERIC(10,2), quantity INTEGER )
TABLE: CREATE TABLE artists ( id INTEGER, name VARCHAR(120) )
TABLE: CREATE TABLE tracks ( id INTEGER, name VARCHAR(200), album_id INTEGER, media_type_id INTEGER, genre_id INTEGER, composer VARCHAR(220), milliseconds INTEGER, bytes INTEGER, unit_price NUMERIC(10,2) )
TABLE: CREATE TABLE customers ( id INTEGER, first_name VARCHAR(40), last_name VARCHAR(20), company VARCHAR(80), address VARCHAR(70), city VARCHAR(40), state VARCHAR(40), country VARCHAR(40), postal_code VARCHAR(10), phone VARCHAR(24), fax VARCHAR(24), email VARCHAR(60), support_rep_id INTEGER )
TABLE: CREATE TABLE sqlite_sequence ( name any, seq any )
TABLE: CREATE TABLE employees ( id INTEGER, last_name VARCHAR(20), first_name VARCHAR(20), title VARCHAR(30), reports_to INTEGER, birth_date TIMESTAMP, hire_date TIMESTAMP, address VARCHAR(70), city VARCHAR(40), state VARCHAR(40), country VARCHAR(40), postal_code VARCHAR(10), phone VARCHAR(24), fax VARCHAR(24), email VARCHAR(60) )
TABLE: CREATE TABLE genres ( id INTEGER, name VARCHAR(120) )
TABLE: CREATE TABLE playlist_tracks ( playlist_id INTEGER, track_id INTEGER )
TABLE: CREATE TABLE albums ( id INTEGER, title VARCHAR(160), artist_id INTEGER )

### Question ###
List the top 5 genres by number of tracks. List genres name and total tracks. Plot them as bar chart.

### Accurate SQL ###

SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5