numberOfPositiveRoots(R)
i1 : numberOfPositiveRoots(rootSystemD(4)) o1 = 12
The source of this document is in WeylGroups.m2:2648:0.