First, add Col1 to the Columns shelf.
Then place COUNTD(Col2) in the Rows shelf & then right-click it and select Measure / Count (Distinct).)
This will give you a bar chart by default.
For a table, place COUNTD(Col2) into the Text shelf instead.
Hope this answer helps you!