code: def findCircleNum(self, M):
      """
      :type M: List[List[int]]
      :rtype: int
      """
      # because
      visited = [0] * len(M)
      count = 0
      for i in range(len(M)):
          if visited[i] == 0:
              self.dfs(M, visited, i)
              count += 1
      return count
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.findCircleNum(M) and returns: count