Shape keys only store the vertex positions, so a matching number is all that's required.
If you run bpy.app.debug = True
in the python console, you'll get a Indices option in the Mesh Display panel of the Properties shelf. With it enabled you can see the index numbers of vertices — these are what's used to find the corresponding point to move to.