def count_bits(string: int, bitval: str = '1') -> int:
    """Count the bit value in a bistring

    Args:
        string (bitstring) - a bitstring to count the bits of

        bitval (string) - include the option to count unset bits

    Returns:
        int - the number of bits equal to bitval
    """
    return bin(string).count(bitval)