Thank you Sandra for the quick response. Next time , I will open a fresh posting.
I found the fix for the solution. My problem is specific to the statement select count(*) from <table>.
It appears even though the statement would return a single value , I have to declare internal table for returned value. Also for Oracle database , it appears we have to execute next_package command at least once to get the result. I found the solution at the following link.
http://stackoverflow.com/questions/30578267/how-to-get-the-row-count-via-adbc-native-sql