title: How to find the number of (key , value) pairs in a map in scala?
body: <p>I need to find the number of (key , value) pairs in a Map in my Scala code. I can iterate through the map and get an answer but I wanted to know if there is any direct function for this purpose or not.</p>