What are great forty? What are great forty? 
What are the great forty according to following Sutta.
I can identify 30.

Noble tenfold path with mundane and supermundane account for 20  

Wrong tenfold path account for another 10.

What is the remaining 10? 

=============

“Therein, bhikkhus, right view comes first. And how does right view come first? In one of right view, right intention comes into being; in one of right intention, right speech comes into being; in one of right speech, right action comes into being; in one of right action, right livelihood comes into being; in one of right livelihood, right effort comes into being; in one of right effort, right mindfulness comes into being; in one of right mindfulness, right concentration comes into being; in one of right concentration, right knowledge comes into being; in one of right knowledge, right deliverance comes into being. Thus, bhikkhus, the path of the disciple in higher training possesses eight factors, the arahant possesses ten factors.

https://suttacentral.net/mn117/en/bodhi
In one of (R.1.1) right view, wrong view (W.1.1) is abolished and the many evil unwholesome states (W.1.2) that originate with wrong view as condition are also abolished, and the (R.1.2) many wholesome states that originate with right view as condition come to fulfilment by development .... In one of (R.10.1) right deliverance, wrong deliverance (W.10.1) is abolished, and the many evil unwholesome states (W.10.2) that originate with wrong deliverance as condition are also abolished, and the (R.10.2) many wholesome states that originate with right deliverance as condition come to fulfilment by development.


  Thus, bhikkhus, there are twenty factors on the side of the
  wholesome and twenty factors on the side of the unwholesome.


10 right factors + 10 wholesome states originating from 10 right factors + 10 wrong factors + 10 unwholesome states originating from 10 wrong factors = 40