Need help with syntax for count if function

#1
Dear all,

could you please help me to write a syntax for following task:

I have several occasions happening at certain dates, I need to calculate total number of cases that have happen before some deadline.

client, deadline, letter1, letter2, letter3, letter4, letter5
1, 01.01.2016, 01.12.2015, 01.03.2015, NULL, 02.01.2016, 05.05.2016
2, 12.03.2015, 01.01.2015, NULL, 06.12.2016, NULL, NULL

etc.

So I need to create variable that counts all cases that happened before deadline:

COUNT N_of_cases =letter1 TO letter5 (??????????? < deadline)