fixes to filtering

Various fixes to index queries in the API. switched to using NDB Admin instead of counting a query.