Get Required Number of Colors for Node Color Variable
Source:R/ggraph_transitions.R
dot-get_required_colors_count.RdInternal helper to determine how many colors are needed for discrete color variables. Returns appropriate count for continuous variables or unique value count for discrete.