Find count of sub_string in string : <p>Why is this giving output as 1 and not 2:</p>

<pre><code>string = "ABCDCDC"
print(string.count("CDC"))
</code></pre>

<p>Also, since this is not working, how can I get 2 in this case?</p>
