Changed .count to .size for querying in piechart