A RETURNING * clause should produce rows(), just like a SELECT so that should work out of the box.
RETURNING *
rows()
SELECT