This will give 0...because of null values...where will work like if it is true for that value then the row is returned or false it will not return the row with that value....on the otherhand null is a unknown value so when it is compared with true,false or unknown it return unknown itself so when there are null the not in operator cannot give the correct truth or false values...
on the other hand "in" will work perfectly fine
the query can be simplified like this
select count() from Mystery
where A not in( select B from Mystery)
this will evaluate as
select count() from Mystery
where (1<>NUll and 1<>4 and 1<>5 and 1<>6) or (2<>NULL and 2<>4......)or (3<>Null.....) or (NULL<>NULL....)
so 1<>NUll--unknown and 1<>4--true and 1<>5--true and 1<>6--true
eventhough rest of them are true due to "and" of unknown the expression evaluates to unknown...
where will return particular row only when it is evaluated to true