select id,length(string) - length(replace(string,',','')) as cnt
from strings;
查找某列字符串中字符的个数,用length(string)函数