Pergunta de entrevista da empresa S&P Global

Given a set of string, write a code that counts the set bits of the string.