You use the SUMPRODUCT or SUM function to count the number of errors.
Additionally, press the CTRL+SHIFT+ENTER keys to create an array formula for the SUM and ISERROR functions to work.