Calculating Term frequency without tfidfvectorizer()

I am trying to calculate the term frequency without scikit or nltk. I have a corpus with four documents. My code somehow is calculating only unique values. The TF of repeated words in the corpus is not calculated. That is,

corpus=['this is my first python code',
        'this is my second line of code',
        'and this contains third',
        'is this my last line']

What I am expecting is a dictionary with each word and its TF. But somehow my output is not calculating the TF of repeating words. 'this', 'is', 'my' repeats in the first and second document. Every word will have different TF in different documents. But my code is calculating TF of this is and my from the first document and then is not calculating it for the second document and so on.

for sentence in corpus:
    for key,value in Countofeachword.items():

Is there any major understanding gap in my concept? I am not able to proceed. Can someone please provide a small hint on where I am going wrong? Thanks.