Find and count all attrs needs attributes reset

If you don't do this, you will get errors similar to:
```javascript
must appear in the GROUP BY clause or be used in an aggregate function
```
when doing the count part of the query (when you have attributes included in the query)