Okay, first of all, I'm not exactly sure what the meaning of 'where State = State' is in your sql statement, but I'll assume that you're able to get the query working right. I would suggest adding the following..
ORDER BY State
so that you get the results in alphabetical order by state.
then, something like this..
echo "<TABLE border = '1'>"
$col = 0
echo "<TR>"
while ($row = mysql_fetch_array($result))
{
$col++
echo "<TD>";
if ($row['Count']>0 )
{
echo "<A href = 'somepage.php?state=" . $row['State'] . " ' >";
echo $row['State'] . "</A>"
}
else
{
echo $row['State'];
}
echo "</TD>"
if ($col==4)
{
$col=1;
echo "</TR><TR>"
}
}
echo "</TR></TABLE>";
The idea here is that you start by drawing a table, and you have a counter. You always draw the start and end table cell tags around each state, wether it has records or not. If it has records, draw a link, else just display the state name. Drawing each state increments the counter by 1. If the counter hits 4, your in the 4th column, and need to end, then start, a new table row. When you're all done looping through your results set, close out the final TR, and end the table.
Lastly, I tried checking out your example page, it wasn't a complete link. And, rather than using the state name to identify the state to the processing script, I would add an ID field to each state record, if you havent already, and pass that id number.
Hope this helps, let us know what you come up with.