How many customers have two orders or less
SELECT COUNT ( * )  FROM  ( SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T2.customer_id HAVING count ( * )   < =   2 ) 
customers with two orders or less refers to HAVING COUNT(*) <= 2; count of such customers refers to COUNT(*);