implement java version
Merge branch 'impl-java'
update hll_count.lua for Java