Change the query to:
$query ="SELECT mobno, telecaller, COUNT(*)<br />
FROM import<br />
{$WHERE} GROUP BY mobno,telecaller";
The reason being that the GROUP BY (and HAVING) clause can only be applied to columns selected for output.
From the MySQL online reference at
http://dev.mysql.com/doc/refman/5.0/en/select.html[
^]:
Columns selected for output can be referred to in ORDER BY and GROUP BY clauses using column names, column aliases, or column positions. Column positions are integers and begin with 1: