No matter what version of the GPDB open source code, the number of segments is not considered in the cost evaluation, and only a simple process is done when returning the explain result to QD and make the result more clear.
Actually, Greenplum uses the number of segments during planning. Stats info is stored in master, Greenplum will use this global info to deduce the stats locally in each segment.
Some examples are listed below:
adjust_reloptinfo
(big context please refer to the PR: https://github.com/greenplum-db/gpdb/pull/10676)estimate_num_groups_on_segment
is to estimate the local distinct values given the cluster size and the global number of distinctscdbpath_cost_motion