S&P Global interview question

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