Use this API to count cspolicy_cspolicylabel_binding resources configued on NetScaler.
965607
public static long count(nitro_service service, String policyname) throws Exception{
		cspolicy_cspolicylabel_binding obj = new cspolicy_cspolicylabel_binding();
		obj.set_policyname(policyname);
		options option = new options();
		option.set_count(true);
		cspolicy_cspolicylabel_binding response[] = (cspolicy_cspolicylabel_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
1301924
public static long count_filtered(nitro_service service, String zonename, String filter) throws Exception{
		dnszone_domain_binding obj = new dnszone_domain_binding();
		obj.set_zonename(zonename);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		dnszone_domain_binding[] response = (dnszone_domain_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
31274
public static transformpolicy_transformpolicylabel_binding[] get(nitro_service service, String name) throws Exception{
		transformpolicy_transformpolicylabel_binding obj = new transformpolicy_transformpolicylabel_binding();
		obj.set_name(name);
		transformpolicy_transformpolicylabel_binding response[] = (transformpolicy_transformpolicylabel_binding[]) obj.get_resources(service);
		return response;
	}
696807
public static long count(nitro_service service, String name) throws Exception{
		netbridge_nsip6_binding obj = new netbridge_nsip6_binding();
		obj.set_name(name);
		options option = new options();
		option.set_count(true);
		netbridge_nsip6_binding response[] = (netbridge_nsip6_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
426881
public static autoscalepolicy_binding get(nitro_service service, String name) throws Exception{
		autoscalepolicy_binding obj = new autoscalepolicy_binding();
		obj.set_name(name);
		autoscalepolicy_binding response = (autoscalepolicy_binding) obj.get_resource(service);
		return response;
	}
724410
public static long count_filtered(nitro_service service, String limitidentifier, String filter) throws Exception{
		nslimitidentifier_nslimitsessions_binding obj = new nslimitidentifier_nslimitsessions_binding();
		obj.set_limitidentifier(limitidentifier);
		options option = new options();
		option.set_count(true);
		option.set_filter(filter);
		nslimitidentifier_nslimitsessions_binding[] response = (nslimitidentifier_nslimitsessions_binding[]) obj.getfiltered(service, option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
897865
public static vpnglobal_vpnsessionpolicy_binding[] get(nitro_service service) throws Exception{
		vpnglobal_vpnsessionpolicy_binding obj = new vpnglobal_vpnsessionpolicy_binding();
		vpnglobal_vpnsessionpolicy_binding response[] = (vpnglobal_vpnsessionpolicy_binding[]) obj.get_resources(service);
		return response;
	}
999466
public static authorizationpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
		authorizationpolicy_csvserver_binding obj = new authorizationpolicy_csvserver_binding();
		obj.set_name(name);
		authorizationpolicy_csvserver_binding response[] = (authorizationpolicy_csvserver_binding[]) obj.get_resources(service);
		return response;
	}
1284742
public static long count(nitro_service service, Long id) throws Exception{
		bridgegroup_vlan_binding obj = new bridgegroup_vlan_binding();
		obj.set_id(id);
		options option = new options();
		option.set_count(true);
		bridgegroup_vlan_binding response[] = (bridgegroup_vlan_binding[]) obj.get_resources(service,option);
		if (response != null) {
			return response[0].__count;
		}
		return 0;
	}
815096
public static dnspolicylabel_dnspolicy_binding[] get(nitro_service service, String labelname) throws Exception{
		dnspolicylabel_dnspolicy_binding obj = new dnspolicylabel_dnspolicy_binding();
		obj.set_labelname(labelname);
		dnspolicylabel_dnspolicy_binding response[] = (dnspolicylabel_dnspolicy_binding[]) obj.get_resources(service);
		return response;
	}
138834
public static cspolicylabel_binding get(nitro_service service, String labelname) throws Exception{
		cspolicylabel_binding obj = new cspolicylabel_binding();
		obj.set_labelname(labelname);
		cspolicylabel_binding response = (cspolicylabel_binding) obj.get_resource(service);
		return response;
	}
131003
public static csvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{
		csvserver_cachepolicy_binding obj = new csvserver_cachepolicy_binding();
		obj.set_name(name);
		csvserver_cachepolicy_binding response[] = (csvserver_cachepolicy_binding[]) obj.get_resources(service);
		return response;
	}
562093
public static cachepolicy_cachepolicylabel_binding[] get(nitro_service service, String policyname) throws Exception{
		cachepolicy_cachepolicylabel_binding obj = new cachepolicy_cachepolicylabel_binding();
		obj.set_policyname(policyname);
		cachepolicy_cachepolicylabel_binding response[] = (cachepolicy_cachepolicylabel_binding[]) obj.get_resources(service);
		return response;
	}
867991
public static vpnvserver_responderpolicy_binding[] get(nitro_service service, String name) throws Exception{
		vpnvserver_responderpolicy_binding obj = new vpnvserver_responderpolicy_binding();
		obj.set_name(name);
		vpnvserver_responderpolicy_binding response[] = (vpnvserver_responderpolicy_binding[]) obj.get_resources(service);
		return response;
	}
961419
public static crvserver_crpolicy_binding[] get(nitro_service service, String name) throws Exception{
		crvserver_crpolicy_binding obj = new crvserver_crpolicy_binding();
		obj.set_name(name);
		crvserver_crpolicy_binding response[] = (crvserver_crpolicy_binding[]) obj.get_resources(service);
		return response;
	}
770487
public static filterpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
		filterpolicy_csvserver_binding obj = new filterpolicy_csvserver_binding();
		obj.set_name(name);
		filterpolicy_csvserver_binding response[] = (filterpolicy_csvserver_binding[]) obj.get_resources(service);
		return response;
	}
1122896
public static dnspolicy_dnspolicylabel_binding[] get(nitro_service service, String name) throws Exception{
		dnspolicy_dnspolicylabel_binding obj = new dnspolicy_dnspolicylabel_binding();
		obj.set_name(name);
		dnspolicy_dnspolicylabel_binding response[] = (dnspolicy_dnspolicylabel_binding[]) obj.get_resources(service);
		return response;
	}