Use query result as variable without datafile

Is there a way to save a query result as a variable when using custom keyword. Before, I was using Data Files but now you need the paid version for that feature.

I am still able to connect to a sql db and run a query using custom keywords. I now just want to use that query result.

CustomKeywords.‘com.database.sql.execute’(‘Select COUNT(ColumnName) FROM [DB].[TableName]’)

I want the result of the above query into a variable. Adding “int Qresult =” at the beginning did not work.