Look at the code for the recordset created. One line will set a variable equal to the number of rows returned.
Use that variable when you apply webassist server validations server behavior and validate using number validation minimum:0 maximum:0. If it returns anything but zero server validation will fail.
Server validation can validate any value, not just form elements.