Given a haystack and a needle array, create a hashmap of counts and determine whether the haystack contains all needles, handling missing or negative counts.
Implement contains_all_needles(haystack, needles). Return True when every value in needles, including duplicates, appears with sufficient frequency in haystack; otherwise return False. Values are hashable, and the input arrays must not be modified.
def contains_all_needles(haystack, needles):