fn count_repetitions<'dx>(
    dcx: DiagCtxtHandle<'dx>,
    depth_user: usize,
    matched: &NamedMatch,
    repeats: &[(usize, usize)],
    sp: &DelimSpan,
) -> PResult<'dx, usize>Expand description
Used solely by the count meta-variable expression, counts the outermost repetitions at a
given optional nested depth.
For example, a macro parameter of $( { $( $foo:ident ),* } )* called with { a, b } { c }:
[ $( ${count(foo)} ),* ]will return [2, 1] with a, b = 2 and c = 1[ $( ${count(foo, 0)} ),* ]will be the same as[ $( ${count(foo)} ),* ][ $( ${count(foo, 1)} ),* ]will return an error because${count(foo, 1)}is declared inside a single repetition and the index1implies two nested repetitions.