split objects over groups and count metrics