I have a dataset with 12000+ records, that looks like below which I need to count the strings. the dataset looks like
Drugs Gender year
met,met,sulp,DPP M 2020
met and sulp and DPP M 2021
SGLT SGLT SGLT M 2018
Incretin, AGI, AGI F 2019
THK, USP F 2013
I need output like this kindly suggest me
Drugs number of drugs Gender year
met,met,sulp,DPP 3 M 2020
met and sulp and DPP 3 M 2021
SGLT SGLT SGLT 1 M 2018
Incretin, AGI, AGI 2 F 2019
THK, USP 2 F 2013
Thanks in advance