long getCount(HashMap<String, Long> hash, String type) {
		// We have a special type called 'Total'
		if (type.equalsIgnoreCase(TOTAL_TYPE)) {
			long total = 0;
			for (Long count : hash.values())
				total += (count != null ? count : 0);
			return total;
		}

		// OK get change by effect
		Long count = hash.get(type);
		return count != null ? count : 0;
	}