ndist function

Calculate the number of distributions in a <dist_spec>