SELECT COUNT(*) FROM (SELECT a.ID FROM bn_articles a INNER JOIN bn_articles_distribution d ON d.ArticleID = a.ID INNER JOIN bn_articles_meta am ON am.ArticleID = a.ID INNER JOIN bn_articles_categories c ON c.category_id = d.category_id WHERE a.publish <= NOW() AND am.language_id = 1 AND d.category_id = 7 LIMIT 10000) as temp