In Scala mutable collections, count() method is utilized to count the number of elements in the SortedSet.
Method Definition: def count(p: (A) => Boolean): Int
Return Type: It returns the number of elements present in the SortedSet.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.