K, then I understand. I didn't mean to be an ass about it, it is just that a lot of people are posting without knowing what they need, I thought that you were one of those. But fortunatley you are not.
You won't like the code when you see it, it is so simple that you won't understand why you didn't think of it yourself.
// Query and getting results
$count = 0;
while (results from query)
{
if (should be counted)
{
$count++;
}
}
echo $count;