determining the number of groups now counts the number of rows in the gprototype file