After Set Transaction activity in Set Transaction Workflow, use Database activity Run Command which is for UPDATE , INSERT , and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.
Make sure you use Connect to connect to the database and then after Run Command use Disconnect from Database to disconnect the connection.