title: find number of 1 and 0 combinations in two columns
body: <p>Input:      </p>
  
  <pre><code>            X   Y
  Hyderabad   1   1
  Bangalore   0   1
  Goa         1   1
  Chennai     0   1
  Hyderabad   0   1
  Goa         0   0
  Chennai     0   1
  Goa         0   0
  Hyderabad   1   0
  Chennai     0   1
  Chennai     1   1
  Goa         0   1
  Bangalore   0   0
  Bangalore   0   1
  </code></pre>
  
  <p>expected output:</p>
  
  <pre><code>        X   
          0   1
  Y   0   3   1
      1   7   3
  </code></pre>