$linkcount = $db->query_first(" SELECT COUNT(linkid) AS linkcount FROM links_favorites WHERE userid IN (1, 2)");