What is the function of count in pyhthon 3.5?

Help me out!!!

The function, as the name itself indicates, counts the number of occurances of a string in another string.

For example:

s = 'abbabb'
c1, c2 = s.count('a'), s.count('b')
print(c1)
print(c2)

It should print “2\n4” (’\n’ is ‘newline’); because there are 2 'a’s and 4 'b’s in the string ‘s’