Kotlin solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    fun countGoodRectangles(rectangles: Array<IntArray>): Int {\n        var maxSquareSide : Int = 0\n        val list = mutableListOf<Int>()\n        var countSquare : Int = 0\n        for (i in rectangles)\n        {\n            var minSide = minOf(i[0], i[1])\n            list.add(minSide)\n            if (minSide > maxSquareSide) maxSquareSide = minSide\n        }\n\n        list.forEach { element ->\n            if (element == maxSquareSide) countSquare++\n        }\n        return countSquare\n    }\n}\n```
['Kotlin']