countif function for error
I do not understand the formula completely
The COUNTIF function checks for a given criteria and returns the count whether true or False.
Here in this video, they have used the range in the P&L statement sheet to count number of instances of different terms under mapping column in the database sheet. So it found that Error under mapping has zero instance in the P&L Statement Sheet, hence the error cell was identified as something that is causing the error.
In simple words it's a verification method to ensure all the mapping terms included in P&L Sheet are available under the mapping column in the database.
Hope I was able to clear things.
The Countif function is used to Validate that all mapping has been adequately captured by showing the number of times the mapping occurs