The C++ library offers a count-min sketch. The Java library should include a compatible implementation.