countMachines is erroniously checking the request object, rather than results.headers for headers