The indexes.getRowCount() function returns how many columns are involved into the indexes. One more column from the primary key and one more from the assumeunique.