Use this API to count the filtered set of sms_server resources.
filter string should be in JSON format.eg: "vm_state:DOWN,name:[a-z]+"
345001
public static long count_filtered(nitro_service service, String filter) throws Exception
	{
		sms_server obj = new sms_server();
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		sms_server[] response = (sms_server[])obj.get_resources(service, option);
		if (response != null && response.length > 0)
			return response[0].__count;
		return 0;
	}
532016
public static sms_server delete(nitro_service client, sms_server resource) throws Exception
	{
		resource.validate("delete");
		return ((sms_server[]) resource.delete_resource(client))[0];
	}
411890
public static sent_sms[] get(nitro_service client) throws Exception
	{
		sent_sms resource = new sent_sms();
		resource.validate("get");
		return (sent_sms[]) resource.get_resources(client);
	}
639149
def inbox_count_for(user):
    
    return Message.objects.filter(recipient=user, read_at__isnull=True, recipient_deleted_at__isnull=True).count()
27881
public static long count_filtered(nitro_service service, String servicegroupname, String filter) throws Exception{
		sslservicegroup_sslciphersuite_binding obj = new sslservicegroup_sslciphersuite_binding();
		obj.set_servicegroupname(servicegroupname);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		sslservicegroup_sslciphersuite_binding[] response = (sslservicegroup_sslciphersuite_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
447676
public static gslbvserver[] get_filtered(nitro_service service, String filter) throws Exception{
		gslbvserver obj = new gslbvserver();
		options option = new options();
		option.set_filter(filter);
		gslbvserver[] response = (gslbvserver[]) obj.getfiltered(service, option);
		return response;
	}
1365936
public static vm_device[] get_filtered(nitro_service service, String filter) throws Exception
	{
		vm_device obj = new vm_device();
		options option = new options();
		option.set_filter(filter);
		vm_device[] response = (vm_device[]) obj.getfiltered(service, option);
		return response;
	}
3409
public static long count_filtered(nitro_service service, String monitorname, String filter) throws Exception{
		lbmonbindings_service_binding obj = new lbmonbindings_service_binding();
		obj.set_monitorname(monitorname);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		lbmonbindings_service_binding[] response = (lbmonbindings_service_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
386749
def is_api_filter(self, filter_field):
        """"""
        if self.filter_type == 'server':
            for choice in self.filter_choices:
                if (choice[0] == filter_field and len(choice) > 2 and
                        choice[2]):
                    return True
        return False
913736
public long count(final Bson filter, final RemoteCountOptions options) {
    return operations.count(filter, options).execute(service);
  }
1055891
public static long count_filtered(nitro_service service, String wlmname, String filter) throws Exception{
		lbwlm_lbvserver_binding obj = new lbwlm_lbvserver_binding();
		obj.set_wlmname(wlmname);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		lbwlm_lbvserver_binding[] response = (lbwlm_lbvserver_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
1072584
public static appfwjsoncontenttype[] get_filtered(nitro_service service, String filter) throws Exception{
		appfwjsoncontenttype obj = new appfwjsoncontenttype();
		options option = new options();
		option.set_filter(filter);
		appfwjsoncontenttype[] response = (appfwjsoncontenttype[]) obj.getfiltered(service, option);
		return response;
	}
836619
public static long count_filtered(nitro_service service, String labelname, String filter) throws Exception{
		appfwpolicylabel_appfwpolicy_binding obj = new appfwpolicylabel_appfwpolicy_binding();
		obj.set_labelname(labelname);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		appfwpolicylabel_appfwpolicy_binding[] response = (appfwpolicylabel_appfwpolicy_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
744386
public static sent_sms[] delete(nitro_service client, sent_sms[] resources) throws Exception
	{
		if(resources == null)
			throw new Exception("Null resource array");
		
		for(int i = 0; i < resources.length; i++)
		{
			resources[i].validate("delete");
		}
		
		if(resources.length == 1)
			return ((sent_sms[]) resources[0].delete_resource(client));
		
		return ((sent_sms[]) delete_bulk_request(client, resources));
	}
438576
public static long count_filtered(nitro_service service, Long td, String filter) throws Exception{
		nstrafficdomain_bridgegroup_binding obj = new nstrafficdomain_bridgegroup_binding();
		obj.set_td(td);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		nstrafficdomain_bridgegroup_binding[] response = (nstrafficdomain_bridgegroup_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
1061938
public static current_hostname[] get_filtered(nitro_service service, String filter) throws Exception
	{
		current_hostname obj = new current_hostname();
		options option = new options();
		option.set_filter(filter);
		current_hostname[] response = (current_hostname[]) obj.getfiltered(service, option);
		return response;
	}
719970
public static long count_filtered(nitro_service service, String metrictable, String filter) throws Exception{
		lbmetrictable_metric_binding obj = new lbmetrictable_metric_binding();
		obj.set_metrictable(metrictable);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		lbmetrictable_metric_binding[] response = (lbmetrictable_metric_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}