I would like to perform a bounding-box query and count the number of ways, stopping when I reach a threshold. I don’t see how to do this in osmosis, so I’m open to any command-line tool that can do it for me. This is in order to create a binary search tree for the planet.osm file.