Below is a simple usage of a single CB integer field that increments. Note it does not have the complex conditions of groups that you are wanting, you must add that your self.
First you need to setup the integer field. Lets call it cb_autoinc as this will be its database column and be used throughout this usage.
Next you need to create a CB Query field (we'll call it cb_queryinc) that will pull from _comprofiler the highest value and increment it by 1. We can do this with the below query.
Code:
SELECT ( `cb_autoinc` + 1 ) FROM `#__comprofiler` ORDER BY `cb_autoinc` DESC LIMIT 1
Now you'll need a field action using CB Auto Actions with the after registration trigger. You'll configure it to set cb_autoinc to the following value (a substitution of the query field).
[cb:userfield field="cb_autoinc" /]
Now everytime a user registers it should find the highest value of the increment field, add 1, then set the field for them as that incremented value.