human
Count of sub | Function to return the number of sub - strings that do not contain the given character c.
Length of the string.
Traverse in the string.
If current character is different from the given character.
Update the number of sub - strings.
Reset count to 0.
For the characters appearing after the last occurrence of c.
Driver code"
Solution in Python:

=====
Write me a code to count of sub and the other steps required?
assistant
#Here is code to count of sub and the other steps required.
 def countSubstrings ( s , c ) :
	n = len ( s )
	cnt = 0
	Sum = 0
	for i in range ( n ) :
		if ( s [ i ] != c ) :
			cnt += 1
		else :
			Sum += ( cnt * ( cnt + 1 ) ) // 2
			cnt = 0
	Sum += ( cnt * ( cnt + 1 ) ) // 2
	return Sum
s = " baa "
c = ' b '
print ( countSubstrings ( s , c ) )