prova con
Codice 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"
al posto della tua query e nel campo cont hai il numero di volte che appare l'ip in clients
che puoi testare al volo...