code: def body_count(self):
          
          # labels are (len(vertices), int) OB
          count, labels = graph.csgraph.connected_components(
              self.edges_sparse,
              directed=False,
              return_labels=True)
          self._cache['vertices_component_label'] = labels
          return count
docs: How many connected groups of vertices exist in this mesh.
  
          Note that this number may differ from result in mesh.split,
          which is calculated from FACE rather than vertex adjacency.
  
          Returns
          -----------
          count : int
            Number of connected vertex groups