title: Number of edges in an undirected graph
body: <p>Given an adjacency list representation for an undirected graph. Write a function to count the number of edges in the undirected graph.</p>
  
  <p>I know the number of edges in an undirected graph is n(n-1)/2 but I don't know how to write a function for that. </p>
  
  <p>Considering that I've a list and using that I'll be counting the number of edges. How should I start?</p>