class_docstr: Class which stores vertex and edge properties that can be used to construct
  Graphs from individual property selections and used later to annotate graph
  algorithm results with corresponding properties.
class_docstr_tok: ["Class","which","stores","vertex","and","edge","properties","that","can","be","used","to","construct","Graphs","from","individual","property","selections","and","used","later","to","annotate","graph","algorithm","results","with","corresponding","properties","."]
docstr: Return the number of all edges or edges of a given type.
  
  Parameters
  ----------
  type : string, optional
      Edge type or None, if None then all edges are counted
  
  Returns
  -------
  int
      If type is None (the default), returns the total number of edges,
      otherwise return the number of edges of the specified type.
  
  See Also
  --------
  PropertyGraph.get_num_vertices
  
  Examples
  --------
  >>> import cugraph
  >>> import cudf
  >>> from cugraph.experimental import PropertyGraph
  >>> df = cudf.DataFrame(columns=["src", "dst", "some_property"],
  ...                     data=[(99, 22, "a"),
  ...                           (98, 34, "b"),
  ...                           (97, 56, "c"),
  ...                           (96, 88, "d"),
  ...                          ])
  >>> pG = PropertyGraph()
  >>> pG.add_edge_data(df, type_name="etype", vertex_col_names=("src", "dst"))
  >>> pG.get_num_edges()
  4
code: def get_num_edges(self, type=None):
      """
      Return the number of all edges or edges of a given type.
  
      Parameters
      ----------
      type : string, optional
          Edge type or None, if None then all edges are counted
  
      Returns
      -------
      int
          If type is None (the default), returns the total number of edges,
          otherwise return the number of edges of the specified type.
  
      See Also
      --------
      PropertyGraph.get_num_vertices
  
      Examples
      --------
      >>> import cugraph
      >>> import cudf
      >>> from cugraph.experimental import PropertyGraph
      >>> df = cudf.DataFrame(columns=["src", "dst", "some_property"],
      ...                     data=[(99, 22, "a"),
      ...                           (98, 34, "b"),
      ...                           (97, 56, "c"),
      ...                           (96, 88, "d"),
      ...                          ])
      >>> pG = PropertyGraph()
      >>> pG.add_edge_data(df, type_name="etype", vertex_col_names=("src", "dst"))
      >>> pG.get_num_edges()
      4
      """
      if type is None:
          if self.__edge_prop_dataframe is not None:
              return len(self.__edge_prop_dataframe)
          else:
              return 0
      if self.__edge_prop_dataframe is None:
          return 0
      value_counts = self._edge_type_value_counts
      return value_counts[type] if type in value_counts else 0
  
imports: import cudf
  import numpy
  import cugraph
  from cugraph.utilities.utils import import_optional, MissingModule, create_list_series_from_2d_ar
  from typing import Union
label_desc: Use image node_id 13 for calling the EXPERIMENTAL__PropertyGraph obj's underlying member method code with example usage: obj.get_num_edges(type) and returns: unknown, int, len, int