select data from related tables and display their counts in the relating table
name != 'NULL'


That assumes that name can be the 4-letter string 'NULL'.  If, in reality, it can be the special value NULL, then do this:

name IS NOT NULL


Please provide SHOW CREATE TABLE for each table, plus a small amount of representative data including some nulls.