Python easier solution with explanation (dictionary)
Explanation:\nTo get maximum square from rectangle we  get the minimum from width and height.  By dictionary we count all squares, and the value of the biggest 
**Explanation:**\nTo get `maximum square` from rectangle we  get the minimum from `width` and `height`.  By dictionary we count `all squares`, and the `value` of `the biggest square`.\n\n```\ndef countGoodRectangles(self, rectangles):\n        t = {}\n        for r in rectangles:\n            p = min(r)  # get the minimum from width and height\n            if p in t:\n                t[p] += 1 # increase the value of square if the square already  exists  in dict.\n            else:\n                t[p] = 1 # add new square to dict\n        return t[max(t.keys())]  # get the value of the biggest square\n```
['Python', 'Python3']