There are a whole lot of formula options that you can use in Salesforce, in Validations, Workflows, formula fields, etc. Here’s another useful example:

Roll-Up Summary. To count the number of, for example, Contacts on an Account, build a new field on Account, choose the Field Type of ‘Roll-up Summary’. Summarize object as ‘Contacts’. Summary Type of ‘COUNT’.