How to find total number of records using soql in Salesforce

How to find total number of records using soql in Salesforce

Sample Code:

Integer counter = [ Select count()
                                                  FROM Member__c
                                                                                 Where Age__c > 40];

System.debug(‘Total Number of records: ‘ + counter);

Leave a Reply