array with count and display barchart