Question: count the number of records for each track id | do you mean count the number of race ids for each track id? | How about this--list all track Ids
SQL: select track_id from track