Milliampere hours, it's how much energy it can deliver per time, so the bigger the number the longer the batteries last. They should be compatible, unless they have internal logic and the software doesn't recognize them (like Nikon bodies that used to not turn on with third party batteries).
The H6 battery has almost twice the capacity of the H4!