Keep in mind that a vertex is more than just a position. There's 24 vertices because each face needs 4 vertices to itself. A vertex can't be shared with the other two faces touching it, because it has a distinct normal from them.
If you want unique vertex positions, just sort the returned list and remove the duplicates.