This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You should use an alias such as "select count(*) as the_sum ..." then you can call getInt("the_sum") to read it. In particular though, selecting count is a *really* bad practice for auto-incrementing data. First and foremost, if an old record is deleted, the entire system stops being able to insert records. Selecting the max id + 1 is generally better, but keep in mind none of these techniques are thread safe if you don't wrap them in a transaction. Two users both trying to insert records could collide if they both read the same id.