Frozen parser

Added frozen counters to C++ base and Java bindings.