If the vertices are not a part of the same object, it won't merge. Otherwise, it should just be a matter of distance.