The filter command doesn't delete the sh:class with 0 count in the filtered shape.
While it's not really a problem in some usage, the option to do so would be great in order to produce a documentation from the filtered shape that shows what's really present in the graph.