In a previous question it was shown that a mesh that was duplicated and deformed separately can be used to define a shape key in the original mesh. If the vertex count doesn't match then you get an error message saying "Selected meshes must have equal number of vertices".
As a test I subdivided a cube and merged some vertices to get a vertex count of 507 to match the count in a default suzanne mesh. After joining as a shape key I see a small resemblance to the suzanne shape but really have nothing more than a collection of randomly joined vertices.
So what defines a matching topology in the context of using a mesh to generate a shape key?