[lang-ref] ( count_occurrence ) ( python )

def test_count_occurrence():
    text = 'prerequisites'
    s = 're'
    assert text.count(s) == 2