Unable to count the number of cells with specific content.

In a spreadsheet (Version: I want to count how often a cell contains the text “Done” in some range. I have tried the following expression:


but I only get an error popup

Invalid Value

What am I doing wrong?

I know why I have this problem. I have marked the cells with “Data → Validity”, and that formula was, no surpise, not in the list of allowed values.

The formula works as expected…