Improve vertex removal edge count test.

Now we check both in-edges and out-edges.