Intenta con este código:
Código PHP:
<?php
include("privados/config.php");
$id=$_GET['id'];
$resultados=mysql_query("select * from imagenes where id_logueado='$id_usuario'",$conexion) or
die("Problemas en el select:".mysql_error());
$i = 0;
?>
<div id="click-cambio">
<?php
$i = 1;
while($fot=mysql_fetch_assoc($resultados))
{
$foto_nombre=$fot['nombre'];
?><img src="<?php echo "$foto_nombre"; ?>" alt="Imagen N" rel="<?php echo $i; ?>" />
<?php
++$i
}
?> </div>