Lee esto:
http://osdir.com/ml/java.javaspain/2.../msg00046.html
te dejo un ejemplo:
Statement stmt = connection.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR _READ_ONLY);
ResultSet resultSet = stmt.executeQuery("SELECT * FROM tutabla");
resultSet.last();
int rowCount = resultSet.getRow();
Espero que te sea util.
Saludos.