Check your ColdFusion docs. It's probably got something builtin.
For example, in ASP coding, you can do
connection.Execute "...sql code...", howmany
and upon completion the variable howmany
contains a count of the number of records affected (deleted or updated or inserted, as the case may be for the sql used).
Similar constructs are available with JSP.
So I'd be surprised if CF doesn't have a "built-in" way so that you don't have to pull trickery to find out.