Getting different value in co-occurrence matrix

machine_learning
data_science
co-occurrence

#1

From this post --> https://www.analyticsvidhya.com/blog/2017/06/word-embeddings-count-word2veec/
When the context window is 2 then how he and is could be appear 4 times.
I found this link --> (https://cs224d.stanford.edu/lecture_notes/notes1.pdf) which shows some different result than previous link.

Any help would be appreciated. Thank you.