code: def count_frames(video_path: str):
      r"""
          Returns the number of frames in a video at ``video_path``.
  
      Args:
          video_path (str): Video Filepath
  
      Returns:
          Frame count
  
      """
      if video_path is None:
          raise ValueError("Specify a valid video path")
  
      stream = Stream(video_path)
      frame_count = stream.count_frames()
      stream.release()
      return frame_count
  
imports: from .stream import Stream
  from ..path import exists
  from ..annotations import Optional
label_desc: Use image node_id 1 for calling a global function with example usage: count_frames(video_path) and returns: frame_count