To view the counts based on habitat and colour, assign your data to a data frame and pass those columns to table().
table()
table(df$habitat, df$colour)
548k questions
547k answers
4 comments
86.3k users