Count Jump Using Accelerometer

My question is, how do I count the number of jump done by the user with accelerometer? The jump I mean here is the user physically holding the device and do a jump, not the virtual character jump in game world (because I seen many post about this).

I found it actually I can use magnitude instead of x/y/z acceleration. Problem solved.