### Question:
ArrayListMultiset implements Multiset<V> { @Override public int count(final V value) { return (int) values.stream().filter(v -> v.equals(value)).count(); } ArrayListMultiset(final List<V> values); @Override int size(); @Override boolean isEmpty(); @Override boolean contains(final Object o); @Override Iterator<V> iterator(); @Override Object[] toArray(); @Override T[] toArray(final T[] a); @Override boolean add(final V v); @Override boolean remove(final Object o); @Override boolean containsAll(final Collection<?> c); @Override boolean addAll(final Collection<? extends V> c); @Override boolean removeAll(final Collection<?> c); @Override boolean retainAll(final Collection<?> c); @Override void clear(); @Override void forEach(final Consumer<? super V> action); @Override Spliterator<V> spliterator(); @Override int count(final V value); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void count() { final var given = new ArrayListMultiset<>(List.of("item1", "item1", "item2", "item3")); assertEquals(2, given.count("item1")); assertEquals(1, given.count("item2")); assertEquals(1, given.count("item3")); }