Count No of occurrences of a tag

How to count the number of occurrences of a tag (OS in my series) in influxdB?
My result should be tag_name, count

OS Count
Windows 3
Linux 4

I need to finally draw a pi in grafana with the query…The pie should depict the no of users per OS.