This is getting messy

Let me recap a few things here:
1) if I hit a unit with number of models in rank (5) more than the number of ranks (4) (hit from the side\flank) - anyway count 4 models hit? When you hit a unit in the flank (ie. the cannon is in the target unit's flank arc), you count
files (left to right) instead of ranks.
2) what about diagonal shoots and other tricks to increase the number of models hit? No luck; the maximum number of models you can hit in a ranked unit is limited to the number of ranks or files in said unit, depending on whether you hit the unit from the front/rear or flank arc respectively.
To make it a bit more simple: In every rank (or file, when it's a flank shot) which is touched by the cannon's bounce trajectory, only one model will be hit, even if the bounce clips more than one model's base per rank (or file).
3) if not, how can I count number of ranks (do single or two models in the back count)? This again depends on the trajectory; if you hit two or more models, each in different ranks (or files, for a flank shot), you get them. It doesn't matter how many models there are in a rank; the "4 makes a rank" rule only works for combat resolution.
4) or cannonball just hit ALL models that are on the trajectory? No.
if I hit the RnF unit in the flank\rear - it must take the panic test (normally)
No! What the guys meant by "like a charge" refers only to working out the arc from which the shot is fired.
Can I shoot with cannon in the enemy unit engaged in HtH? No; this rule is absolute and refers to all shooting. You can, however,
accidentally hit a unit in HTH, at which point the rules for templates versus units in combat kick in. Intentionally creating such accidents is cheating.
where I can get e-book of the last 6th edition rules?You can't: Apart from some Q&A sheets, GW does not publish its rulebooks, army books, annuals, chronicles, etc. in electronic format. If you do come across such a file, it is an illegal copy and we don't want anything to do with it.
I MUST roll the dice every magic phase (my and enemy), when some dices are stored in the Rod, or I just must roll before using them? Every phase, sadly

...
The answer, my friend,
Is blown to smithereens
The answer is blown to smithereens