SELECT  
 COUNT( * ) AS `total` 
 
FROM 
 `elem`
 
WHERE 
  NOT( ( `name` IS NULL ) OR ( `name` = '' ) )
