* filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
*/
public static long count_filtered(nitro_service service, String labelname, String filter) throws Exception{
rewritepolicylabel_policybinding_binding obj = new rewritepolicylabel_policybinding_binding();
obj.set_labelname(labelname);
options option = new options();
option.set_count(true);
option.set_filter(filter);
rewritepolicylabel_policybinding_binding[] response = (rewritepolicylabel_policybinding_binding[]) obj.getfiltered(service, option);
if (response != null) {
return response[0].__count;
}
return 0;