select id,LENGTH(string) - LENGTH(replace(string,",","")) as count
from strings