={X1:Y1, "ID_RF", Z1;
ARRAYFORMULA(QUERY({QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"), TRANSPOSE(SPLIT(JOIN(",", REPT(SPLIT(
QUERY(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"),
"select Col2,count(Col2) where Col2 is not null group by Col2 label count(Col2)''"),
",")&",", QUERY(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "where Col3 !=''"),
"select count(Col2) where Col2 is not null group by Col2 label count(Col2)''"))),
","))&COUNTIFS(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''"),
QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''"), ROW(INDIRECT("A1:A"&
COUNTA(QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''")))), "<="&ROW(INDIRECT("A1:A"&COUNTA(
QUERY(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(
IF(LEN(X2:X), "♠"&X2:X&"♦"&Y2:Y&"♦"&SPLIT(Z2:Z, "/"), )), , 999^99)), , 999^99),
"♠")), "♦")), "select Col2 where Col3 !=''")))))}, "select Col1,Col2,Col4,Col3"))}