public int sizeOf(final KeyValueStore<K, V> store) {
        int size = 0;
        try (final KeyValueIterator<K, V> iterator = store.all()) {
            while (iterator.hasNext()) {
                iterator.next();
                ++size;
            }
        }
        return size;
    }
Utility method to compute the number of entries within the store.

@param store the key value store using this {@link #context()}.
@return the number of entries
streams/src/test/java/org/apache/kafka/streams/state/KeyValueStoreTestDriver.java