title: how to get count of single column while getting data from different tables based on Id
body: <p>I wrote query for getting data from different  tables, Totally I have to get 3 columns of data from 3 tables based on Id, And one of those columns is I have to get count of rows of the table</p>
  
  <pre><code>SELECT vm.Vendor_Name, vc.Contact_Name, COUNT(po.Purchase_order)
  FROM vendor_master vm JOIN
       purchase_order po
       ON po.vendor_id = vm.vendor_id JOIN
       vendor_contacts vc
       ON vc.Vend_id = vm.vendor_id JOIN
       payment_master pm
       ON pm.Vendor_id = vm.vendor_id
  WHERE vm.vendor_id = 1;
  </code></pre>
  
  <p>I wrote Above query for that but its giving some error</p>