int Sql.sql_result()->num_fields()
Returns the number of fields in the result.
Extracted from Pike v7.3 release 11 at 2001-11-03.