Get Bug Count per Versions


How do you count the total number of bugs that are associated to a Version regardless if its Fix Version or Affects Version. So basically, you would have all versions in rows and bugs as column. Is there a dimension for just Versions? Thanks!