Tags:

{{ range $name, $taxonomy := .Site.Taxonomies.tags }} {{ $currentTagCount := len $taxonomy.Pages }} {{ end }}

Categories:

{{ range $name, $taxonomy := .Site.Taxonomies.categories }} {{ $currentCatCount := len $taxonomy.Pages }} {{ end }}