That propably only works for insert, update, or delete statements. DB2 provides the following information in the SQLCA data item sqlerrd(3), which I assume is where getUpdateCount() comes from.
If PREPARE is invoked and successful, contains an estimate of the number of rows that will be returned. After INSERT, UPDATE, and DELETE, contains the actual number of rows that qualified for the operation. If compound SQL is invoked, contains an accumulation of all sub-statement rows. If CONNECT is invoked, contains 1 if the database can be updated; 2 if the database is read only.
If CREATE PROCEDURE for an SQL procedure is invoked and an error is encountered parsing the SQL procedure body, contains the line number where the error was encountered. The sixth byte of sqlcaid must be ’L’ for this to be a valid line number.