Activity › Forums › Salesforce® Discussions › How does Count(fieldname) works in SOQL in Salesforce? Salesforce® Discussions How does Count(fieldname) works in SOQL in Salesforce? Posted by Anjali on September 11, 2020 at 2:44 PM How does Count(fieldname) works in SOQL in Salesforce? Deepak replied 5 years, 8 months ago 2 Members · 1 Reply 1 Reply Deepak Member September 14, 2020 at 5:45 AM COUNT(fieldName) returns the number of rows that match the filtering conditions and have a non-null value for fieldName. This syntax is newer than COUNT() and is available in API version 18.0 and later. Log In to reply. Public All Members My Connections Only Me PublicAll MembersMy ConnectionsOnly Me Public All Members My Connections Only Me