Write SQL query to solve given problem: Among the employees who have a pay rate of above 40, how many of them are male?. Keep the solution inside sql tag ```sql [SQL-Query] ```
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