Updated the nodejs code to return json and added php code to combine the counts