The ROW_COUNT option could produce inconsistent results when used in a query involving global variables, system functions or proxy tables. Such queries are partly executed using CIS (Component Integrated Services). In such cases, use SELECT TOP n instead of setting ROW_COUNT, or set the global variable to a local one and use that local variable in the query.