Write SQL query to solve given problem: How many high-class products are sold by preferred vendors?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT COUNT(T2.Name) FROM ProductVendor AS T1 INNER JOIN Product AS T2 USING (ProductID) INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.PreferredVendorStatus = 1 AND T2.Class = 'M'