for a 40 gallon size tank and space taken by the ls and lr, how many fish should one have?
It's more about bioload than count really. Like you could have 10 really small fish that produce the same bioload as 1 big fish. And you could have 2 fish that are the same size but one poops more or is dirtier than the other and therefore requires a system that can handle that.
Add to this that fish have other requirements beyond the nitrate cycle...for example, bioload-wise a tang would be fine in a 20g alone. But that would be a terrible thing to do because they need more space to swim. Or your bioload and space might be a perfect match for two fish but because one is passive and the other aggressive they can't coexist.
Bottom line is that there is a lot of right answers and a lot of wrong answers. Research each fish species you want and look for those factors: bioload, environmental needs, and compatibility with other tank-mates. Then decide from there. There just isn't one answer to this question.