new instruction "countAll" + some JSONHelper improvements