In general MongoDB aggregation pipeline can substring or split strings using $split or $substr.
Then you can use $lookup to combine the collections with a proceeding $count.
Did I understand your requirements?
Pavel
In general MongoDB aggregation pipeline can substring or split strings using $split or $substr.
Then you can use $lookup to combine the collections with a proceeding $count.
Did I understand your requirements?
Pavel