Something like this?
If you knew the product codes beforehand.
select A.ClientID,
sum(case when B.ProductCode = 'abc' then 1 end) abc,
sum(case when B.ProductCode = 'cde' then 1 end) cde,
sum(case when B.ProductCode = 'fgh' then 1 end) fgh
from TableA A
left join tableB B on A.ClientID = B.ClientID
group by A.ClientID