if the length of the sub string is equal to k and frequency of one of its characters is equal to the length of the sub - string i . e . all the characters are same increase the count
if ( length == k && m [ s [ i ] ] == length ) count ++ ; }