Alexis22, убери с проверки $count3 здесь
if ($count3 or !$count1 or !$count2) header("location: panel.php?id=$user");