num rows check, without uninitialized variable