If I understand what I think you're trying to accomplish...
Try this, see if it does what you need:
PHP Code:
$result_allweight = $DB_site->query_first("
SELECT COUNT(field7) AS total,
FROM " . TABLE_PREFIX . "userfield
$searchclause
");
/*
$result_allweight['total'] - should return the total value.
*/
This is an untested piece of code, I have no idea if it even works. If it doesn't, please post back stating any errors you get, I will do my best to help if I can.
If anyone notices any obvious flaws in that above code, feel free to point them out, thanks.