SELECT  
 SUM( 1 ) AS `all` 
 
FROM 
 `visit`
 
WHERE
 NOT( ( `ip` IS NULL ) OR ( `ip` = '' ) )  