Usa un alias e ordina per sequenza di conteggio corretta
$interests = "SELECT name, COUNT(*) AS my_count
FROM pageinterests
WHERE pageid = '$id'
GROUP BY name HAVING COUNT(*) > 1
ORDER BY my_count";
.......
for($x = 1; $x <= $rim; $x++){
$rat = mysqli_fetch_assoc($interestresults);
echo "<tr>
<td>".$rat['name']."</td>
<td>".$rat['my_count']."</td>
</tr>";
}