my $sql = "SELECT count(*) FROM table WHERE .... "; ...