I have a dictionary of strings, where some keys have duplicate values to other keys like below.
var dict: [String: String] =
["key1": "value1",
"key2": "value1",
"key3": "value2",
"key4": "value1"]
How do I get the count of the duplicates of the values (e.g. count of value1 = 3, count of value2 = 1)? I have seen some info on how to do this with booleans, but I have not figured out how to do it with strings. Thanks.