Código PHP:
<?php
$rut=$_POST["rut"];
$delpunto= str_replace ('.','',$rut);
$idp= str_replace ('-','',$delpunto);
$existe="SELECT COUNT(*) FROM tabla WHERE idp=$idp ";
$existe_qry= mysql_query($existe,$conn);
$existe1=mysql_result($existe_qry,0);
?>
Eso debería bastar.