* filter string should be in JSON format.eg: "vm_state:DOWN,name:[a-z]+"
*/
public static long count_filtered(nitro_service service, String filter) throws Exception
{
xen_appcvpx_image obj = new xen_appcvpx_image();
options option = new options();
option.set_count(true);
option.set_filter(filter);
xen_appcvpx_image[] response = (xen_appcvpx_image[])obj.get_resources(service, option);
if (response != null && response.length > 0)
return response[0].__count;
return 0;
}