New Update
To count the total number of records in a database from a Java application, one needs to establish a connection with the database using the connection object and then execute the SQL command that fetches the number of records.
This tip gives the line by line code to do it.