Verify membership of an item within a set while obscuring the number of elements in the set? I'm wondering whether it is possible to achieve the following scenario:

Say you have a set of names {Alice, Bob, Jake}. To verify that the name 'Bob' exists in the set, you can simply compare 'Bob' against each element of the set and discover that one of the entries in the set does indeed match the name 'Bob'.

I need a way to verify membership of, say, 'Bob' in the set, but without exposing the number of elements in the set.

Is there some transformation that can be done on the set {Alice, Bob, Jake} so that the resulting entity can be used to verify the independent membership of any and all of 'Alice', 'Bob', and 'Jake' within the set, but at the same time the resulting entity does not allow one to view the total number of elements that the set comprises?

Thanks a lot
You don't mention multiple parties at all, so the question is: Who knows what? And who must not know the number of elements in the set?

And then, the most simple solution actually doesn't need cryptography:


Let's assume Bob has the set of elements and Alice wants to know if some element $x$ is in the set.
Alice sends $x$ to Bob.
Bob answers with yes or no.


Obviously, this doesn't hide $x$ from Bob. If we use some hash value $h(x)$ instead (Bob hashes all elements, too, the rest is the same), then given enough entropy in $x$ Bob might not be able to find $x$ - if it isn't in the set (if it is, he also knows the preimage as you can assume Bob didn't delete the original elements).

Depending on what kind of properties you want, there are various constructions. For example set membership proofs, where Bob actually has to prove that the element is in the set and a simple yes or no isn't enough. If you want to achieve that Bob doesn't even know if the answer is yes or no, this might also be possible - based on some sort of oblivious transfer. 

Another interesting construction, which might suit your needs, might be  accumulators - and that's my best guess right now: Bob gives the accumulator to Alice, which doesn't expose the elements or their number on its own. But he is able to prove that some element is actually contained in the set represented by the accumulator.