123
SET @str='1,2,3,4,5';SET @separator=',';SELECT (LENGTH(@str) - LENGTH(REPLACE(@str, @separator, '')) / LENGTH(@separator))+1;