updated the query for number of facilities to do most of its computation in memory using set intersection. It turns out there's a limit to the number of items that can be queried using the in_ filter.