I am using the command "show tag values on with key = " it is showing me the list of tags but I want to count the entries related to that tag.
I guess you want to know tag values cardinality:
SHOW TAG VALUES EXACT CARDINALITY WITH KEY = "myTagKey"
Doc: https://docs.influxdata.com/influxdb/v1.7/query_language/spec/#show-tag-values-cardinality