hi!
in order to get the number of results, take a look at mysql_num_row()
and if you want to show details, i think its best to make one new site and send the link to this site with a parameter
while($r=mysql_fetch_array($result))
{
$name=$r["name"];
echo "<a href='newsite.php?name=$name'>$name</a>";
//2 matches after searching, click on name that should show more details
}