Info I have so far..
I thought I would add this ...maybe it will help someone here. . . (since no one could help me...lol)
I looked up the wiring diagrams for the 97 B series and found no clear indications in the documents about what the pulse count should be. Although the troubleshooting section does identify that the tach does count pulses.
It has been years since I stuck my head under the hood of a Mazda B series so I am guessing on some of this.
I'm pretty sure (guessing) this vehicle used a distributor-less, waste spark ignition system i.e. one coil drove two spark plugs, one coil for each pair of cylinders (except that weird 2.7 liter four cylinder with two separate ignition systems).
If that is the case the system would need two hall sender pulses per electric motor revolution (all waste spark systems use a 2 pulse count) to get correct readings to the tach.
Note also that some waste spark systems had all of the coils packaged into one module so it was hard to tell, but if there is no distributor on the engine and each spark plug does not have a separate coil you are probably dealing with a waste spark system.
For a waste spark ignition, you would need to set up your hall sender with two magnets on the motor shaft, 180 degrees apart.
When you pull the instrument cluster you should find a T/Y (Tan with yellow stripe) in the C214 plug (it is the largest plugs). That is the tach signal wire from the ECU. By the diagram it is the only wire in the plug with a empty position on each side of it.
Your hall sender output would go to this wire.
Another possible way to discover the pulse count is to take a frequency meter to the tach test point on the left fender by the upper shock mount of a still ICE powered vehicle, read the frequency in hertz for a specific RPM and do the math.
A last back door method would be go to a tach manufacturers website and see if there is a listing for your vehicle (try VDO). Most generic aftermarket tachs for 4, 6 and 8 cylinder engines are steppermotor types that count pulses from the ignition system. For distributor type systems you get 2 pulses per revolution for a four cylinder, 3 pulses for a six cylinder and 4 pulses for an eight cylinder. As I previously stated all waste spark system use a two pulse per revolution no mater what the cylinder count.
Be sure to determine if your hall sender set up is going to require a pull up resister to generate the correct square wave pulses.