In the uk it's 7 hitsbehind the saddle on the flat and 8 behind the saddle over fences
There are many rules, unfortunately I don't know all of them.
Whilst there is a requirement for all riders to carry a whip, there is no obligation on riders to use their whip. The whip should only be used for safety and encouragement. Any use of the whip by a rider must be appropriate, proportionate, professional, and take account of the Rules of Racing and guidelines laid down by the BHA. The whip may be used to encourage a horse – to have the horse focused and concentrated – to perform at its best but the stimulus provided by the use of the whip must be limited so as not to compromise the welfare of the horse. Riders can only carry a specifically designed and approved energy absorbing whip.