def test_countwords():
    assert AnalyseText.count_words('This is a test', string = False) == 4