Counting in groups and pairs