Cast unit.count to integer when handing to highcharts

Postgres returns count as a string instead of an int like sqlite did;
cast to an integer so Higcharts can understand it