I\'m getting the following exception.
Caused by:
java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer
You can use:
Integer grandChildCount = ((BigInteger) result[1]).intValue();
Or perhaps cast to Number to cover both Integer and BigInteger values.
Number
Integer
BigInteger