def count(self):
result = <NUM_LIT:0><EOL>bits = self._bits<EOL>while bits:<EOL><INDENT>result += bits % <NUM_LIT:2><EOL>bits >>= <NUM_LIT:1><EOL><DEDENT>return result<EOL>
Returns the number of bits set to True in the bit string.

        Usage:
            assert BitString('00110').count() == 2

        Arguments: None
        Return:
            An int, the number of bits with value 1.