Quota number of collections per res_id

Closes #259