Activity › Forums › Salesforce® Discussions › How to count id in query in Salesforce? Salesforce® Discussions How to count id in query in Salesforce? Posted by Deepak on October 7, 2020 at 4:11 PM How to count id in query in Salesforce? Ayush replied 5 years, 7 months ago 4 Members · 3 Replies 3 Replies Shweta Member October 7, 2020 at 4:17 PM <div>Try this query to count Id for any sObject:</div>Select count(Id) from Account // It will return the number of Id in the account. [adinserter block='9'] Aditya Member October 7, 2020 at 8:20 PM <div>Try this query to count Id for any sObject:</div>Select count(Id) from Account // It will return the number of Id in the account. Ayush Member October 9, 2020 at 3:23 AM SELECT Count(Id) FROM Account . Try this! Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me