numGranularPoints

The number of distinct grid values this variable can take on: the multiples of granularity that fall within the closed range from lowerBound to upperBound. This is the count that granularPoints would produce (computed in closed form, without materializing the list).

Returns null when the variable is continuous (granularity == 0.0), i.e. the number of distinct values is effectively unbounded. Returns 0 when the granularity is so coarse that no multiple of it lies within the bounds (e.g. range 0.4..0.6 with granularity 1.0), in which case there is no feasible grid value at all.