Return the cardinality for a set of number (| x, y |) on the wrapped-interval domain.

        :param x: The first operand (an integer)
        :param y: The second operand (an integer)
        :return: The cardinality

def _wrapped_cardinality(x, y, bits):
        """
        Return the cardinality for a set of number (| x, y |) on the wrapped-interval domain.

        :param x: The first operand (an integer)
        :param y: The second operand (an integer)
        :return: The cardinality
        """

        if x == ((y + 1) % (2 ** bits)):
            return 2 ** bits

        else:
            return ((y - x) + 1) & (2 ** bits - 1)