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

### Instruction:
What is the total number of games with more than 18 loses, a Total League, and more than 317 draws?

### Inputs:
table_name: table, columns: ['League', 'number of seasons', 'total games', 'Draw', 'Loss']

### Response:
SELECT COUNT total games FROM table WHERE Loss > 18 AND League = total AND Draw > 317