public BSONObject handleCommand(String database, BSONObject command) {
Unsupported.supportedAndRequiredFields(command, "count", "query");
String collection = (String) command.get("count");
BSONObject query = (BSONObject) command.get("query");
int l = new DefaultQueryHandler(mongo).handleQuery(database,
collection, query).length;
return new BasicBSONObject("ok", 1).append("n", l);
}