class VulnerabilityService implements Constants {

	public int vulnerabilityAssetCount(String assetGroup, Map<String, String> termsFilter, String applicationFilter,
			String environmentFilter, int from, int size) throws Exception {

		List<String> vulnTargetTypes = getVulnTargetTypes(assetGroup);
		int totalCount = 0;
		if (!vulnTargetTypes.isEmpty()) {
			for (String parentType : vulnTargetTypes) {
				totalCount = totalCount + countForTargetType(assetGroup, parentType, termsFilter, applicationFilter,
						environmentFilter, from, size);
			}
		}
	
		return totalCount;
	}

}