creating frequency table for labelled data

which variables are the ones to group by and which others are the ones to get counts of ?