0
Retina, 78 bytes
.+((.))*$(?<=(?=((?<-5>\5)|(?<-1>.(?<-5>)?))*,(?(5),))^.*,((.)|(?<-1>.))*)
$#2
Try it online!
In a way, this is a pure regex solution where the result is found as the number of captures made by group 2 (i.e. you could access the result in C# via match.Groups[2].Captures.Count...