add java counter