In this task, you need to count the occurrences of the given word in the given sentence.
Sentence: 'theres a sandwich with a pickle next to it and a cookie'. Count the occurrences of the word 'a' in the given sentence.