SyntaxFix
Write A Post
Hire A Developer
Questions
Have a look at Determine and count unique values of an array.
Or, to count the number of occurrences of 5, simply do
5
sum(your_matrix == 5)