added a predicated count statistic
fixed java version
misc bug fixes