query() returns a handle that you can reference using fetch_row() to fetch sequential rows. query_first() just returns the first row, if any, of the query.
These two are equivalent:
PHP Code:
$foo = $DB_site->query_first("SELECT COUNT(*) FROM " . TABLE_PREFIX . "post");
and
PHP Code:
$result = $DB_site->query("SELECT COUNT(*) FROM " . TABLE_PREFIX . "post");
$foo = $DB_site->fetch_array($result);
(BTW, SELECT COUNT(*) is fine if there is no WHERE clause, at least in MySQL's case)