Returning count results

For results that need to be summary counts for a type (i.e. how many machines are at this location), what is the best way to do so? FetchCount? Metrics?

You can use the Persistable.fetchCount API and provide a FetchFilterSpec with a filter. For example:

Locale.fetchCount({filter: Filter.eq('language', 'en')});
// 2

Sounds more like an evaluate call to me, like the following:
MyType.evaluate({projection:"location, count()", group:"location"})

It depends on what information you want.

To find the number of machines at a specific location, you would use fetchCount:

Machine.fetchCount({ filter: Filter.eq('location', 'some_location_id') });

but to find the number of machines at each location, you would use evaluate:

Machine.evaluate({ projection: 'location, count()', group: 'location' });

Adding an example.

To count the number of SmartBulbs in Building1, you’d use this:

SmartBulb.fetchCount({ filter: Filter.eq('', 'bld1') });