<?php


require_once("connect.php");
$count=0;
$n=$_GET['n'];
$a=$n*1000;
$result = mysql_query("SELECT * FROM link where parole like '%' ORDER BY `data` DESC LIMIT $a,1000");

while ($row = mysql_fetch_array($result) ) {

echo "$row[1]</br>";

$count=$count+1;


}
$ita = array("Cane", "Gatto");
$ing = array("Dog", "Cat" );
$testo = str_replace( $ita, $ing, $testo );
echo "tot=";
echo $count;
?>

$ita = array("Cane", "Gatto");
$ing = array("Dog", "Cat" );
$testo = str_replace( $ita, $ing, $testo );

Questa parte di codice dove devo metterla? Ho provato anche prima e dentro il ciclo while.