That is more or less impossible with that database. The reason is that two rooms with the same amount of beds can have different rate since you set the rate in the room table and not the room_des table.
But let's assume that it will never be any problem with the rate, that it will always be the same rate for different rooms with the same amount of beds. Then the query would look something like this:
$sql = SELECT room_des.id, room_des.r_type, room_des.room_name, room.rate, count(room.id) as no_rooms
FROM room_des, room
WHERE room.des.id = room.room_type
AND room.ref = $ref
GROUP BY room_des.id
It may even be possible to do what you want by changing the GROUP BY, and get the different rates for the same type of room. But I can't promise you that, you have to try and see for yourself.