Among the employees who have a pay rate of above 40, how many of them are male?
pay rate above 40 refers to Rate>40; male employee refers to Gender = M
SELECT SUM(CASE WHEN T2.Gender = 'M' THEN 1 ELSE 0 END) FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Rate > 40