There is no limit, except the end of your visa. If it expired without you being here to extend it you would have to start again. Meanwhile wherever you found the reference to 45 days is nonsense
If you want to be sure go and ask Immigration. The people there are not your enemy, but that is how you act. Are you sure you're happy in Thailand, if you're so suspicious of Thai authority figures?
Your friend was unlucky to meet an Immigration officer having a crap day. No need to be scared of requesting an extention. The same IO will not be there