Welcome to the board.

See Help for the COUNTIF function.