public Map<String, Object> getNumberOfDocuments(String jsonQuery) {
Map<String, Object> ret = new HashMap<String, Object>();
try {
DatabaseQuery<AdminServiceType> query = new AdminServiceQuery();
query.fromJson(jsonQuery);
ret.put("numberOfDocuments", getNumberOfDocuments(connector.convert(query)));
} catch (JsonException e) {
Map<String, String> error = new HashMap<String, String>();
error.put("Invalid query", jsonQuery);