CountPaths: Add support for contents
The code is a little tricky in order to avoid asking the TopoSort task for a topological order which includes content (it's a large waste of resources, because contents can be trivially added at the beginning or end of a topological order)
This is the complex pipeline I mentioned in !242 (merged) to justify implementing a custom shell