Python, Simple Explanation
From some source, we can visit every connected node to it with a simple DFS.  As is the case with DFS's, seen will keep track of nodes that have been visited.  
From some source, we can visit every connected node to it with a simple DFS.  As is the case with DFS's, **seen** will keep track of nodes that have been visited.  \n\nFor every node, we can visit every node connected to it with this DFS, and increment our answer as that represents one friend circle (connected component.)\n\n```\ndef findCircleNum(self, A):\n    N = len(A)\n    seen = set()\n    def dfs(node):\n        for nei, adj in enumerate(A[node]):\n            if adj and nei not in seen:\n                seen.add(nei)\n                dfs(nei)\n    \n    ans = 0\n    for i in xrange(N):\n        if i not in seen:\n            dfs(i)\n            ans += 1\n    return ans\n```
[]