You can use:
Integer grandChildCount = ((BigInteger) result[1]).intValue();
Or perhaps cast to Number to cover both Integer and BigInteger values.
You can use:
Integer grandChildCount = ((BigInteger) result[1]).intValue();
Or perhaps cast to Number to cover both Integer and BigInteger values.