SELECT (char_length('привет юзернейм') - char_length(REPLACE('привет юзернейм','е','')))
echo substr_count('привет юзернейм',"е");