I think he wants to count letters without dots before @:
declare @myEmail varchar(50)
set @myEmail = 'you.late.you@asdf.com'
declare @mySearch varchar(50)
set @mySearch = SUBSTRING (@myEmail,0 , PATINDEX( '%@%',@myEmail))
select (LEN(REPLACE(@mySearch, '.', '')))
source
to share