prova con
al posto della tua query e nel campo cont hai il numero di volte che appare l'ip in clientsCodice PHP:
$query = "select b.cont,a.* from clients a ,(select count(*) cont, ip from clients group by ip) b where a.ip=b.ip and invis='0' ORDER BY `clients`.`ID` DESC";
che puoi testare al volo...