Следующий запрос сделает то, что вы ищете
Declare @table table ( lname varchar (20), listagg varchar (20));
insert into @table ( lname , listagg ) values
('' , 'alex'),
('bairstow', null),
('broad' , 'stuart'),
('butler' , ''),
('cook' , 'alaister,alex'),
('hales' , 'alex'),
('jennings', null);
select
lname,
listagg as LFName,
case when lname <>'' then len(lname)-len(replace(lname,',',''))+1 else 0 end as LName_count,
case when listagg <>'' then len(listagg)-len(replace(listagg,',',''))+1 else 0 end as LFName_count
from @table