Basically it works on whether they can prove you are a commercial grower or a person who grows for personal use in relation to amount of plants you have.
So lets look at it both ways, someone with 4 plants in a fairly modest grow could comfortable say, personal use given the amount of bud produced from 4 plant in 8 weeks, so lets break this down into what you could smoke on a daily basis, easy for a solicitor to argue on your behalf as personal smoke. smoked on a daily routine per 8 weeks etc.
Now someone with more than 8 plants etc makes you look, in most cases as more than a personal grower, given the possible yield and the plants you will have probably in veg which is then added on to your 8,
Now your looking exactly like a commercial grower and with serious difficulty to prove otherwise, on this amount of evidence the police would be able to put you in prison even on a first time offence.
Less than 8 is safe......''
More than 8 it's too late