Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is the total in the case when there are more than 4 associate professors, 5 lecturers and fewer professors than 40?

### Inputs:
table_name: table, columns: ['Lecturers', 'Associate professors', 'Assistant professors', 'Professors', 'Total']

### Response:
SELECT COUNT Total FROM table WHERE Associate professors > 4 AND Lecturers = 5 AND Professors < 40