You will need to create a number type field on Account object to show the no. of related contacts.
No_Of_Active_Contacts__c is the custom field i have created to count the related contacts.

Handler Apex Class

You can check the below video to learn more about this trigger.
Any suggestions or changes are welcome!!!!!!!!!!
Leave a comment