使い方 Count counts the number of non-overlapping instances of substr in s. If substr is an empty string, Count returns 1 + the number of Unicode code points in s. 引用元: strings - The Go Programming Language 引数 第1引数:カウント対象が含まれている全体の文字列 第2引数:カウント対象の文字列(これが何個第1引数の文字列の中に入っているかをカウントする) Countは、第1引数の文字列の中の第2引数の文字列の重複しない数を返す。 第2引数が空文字の場合、Countは1 + 第2引数の文字列のUnicode code pointsの数を返す。 実際に使ってみた コード package main