COUNTING MILLIONS OF ROWS IN AN ORACLE TABLE USING JAVA

Searched high and low for getting the number of rows in a table in Oracle with millions of rows. And the best solution is what i found below...