Count occurences of a set in a list Given a non-empty set of strings and a list of strings, find out how many times the set occurs in the list, i.e. how many times you could create the set with items from the list. Every element from the list can only be used once.


  Hint: a set is an unordered list of unique items.


Default input/output rules apply.

No external libraries allowed. Compiler/Interpreter standard libs are okay. This is code golf, so shortest solution counts.



Test cases:

["apple", "banana"], ["apple", "pear", "apple", "banana", "banana"] =&gt; 2

["apple", "banana"], ["apple", "pear", "apple", "banana", "apple"] =&gt; 1

["apple", "banana", "pear"], ["apple", "banana", "kiwi", "apple"] =&gt; 0

["coconut"], [] =&gt; 0




EDIT: removed a sentence stating that the input params are defined in local scope. This contradicts the default IO rules linked above.
Python, 30 bytes



lambda s,l:min(map(l.count,s))


Try it online!