set = Tuples[{DD, Dd, Dd, dd}, 2]
Counts[set, {{DD, Dd}, {Dd, DD}}]
We treat two lists like {DD, Dd} and {Dd, DD} as the same category or identical, since they contain the same elements in different orders.
Under this rule, they count as 2.
Following the same rule, how can we make {DD, Dd} in a set count as 4? The counting rule for other lists remains consistent.