brickgroups store name information if names are set correctly (which i imagine they should be)
relevant variables:
group.NTNameCount - count of different names in the brickgroup
group.NTName[index] - name in the brickgroup at specified index
group.NTObjectCount[name] - count of bricks with the specified name in the brickgroup
group.NTObject[name, index] - brick in the brickgroup with the specified name at the specified index
note that names begin with _ as would the object names