Rica ederim :)
Evet geri saydırmak da mümkün

$query = mysqli_query($db,"SELECT modelKodu, COUNT(ModelKodu) as sayi FROM test GROUP BY modelKodu");
foreach ($query as $item) {
$q = mysqli_query($db,"SELECT * FROM test WHERE modelKodu='{$item['modelKodu']}'");
$number = $item['sayi'];
foreach ($q as $value) {
mysqli_query($db,"UPDATE test SET sss = '$number' WHERE id = '{$value['id']}'");
$number--;
}
}