There is no doubt that Hamas has an agenda and the Gaza Health Ministry works under the auspices of Hamas, so they would have an incentive to cook the numbers to make the death toll seem high, and to ignore the difference in deaths between Hamas fighters and ordinary civilians. But Israel also has an incentive to cook the numbers to make the death toll seem low, and to characterize the percent of deaths being Hamas fighters as being as close to 100% as possible.
So whom to believe? Most people will believe the numbers of the side they are squarely on. Me, I'm not on any side, except on the side of the people who want nothing more than to live ordinary, everyday lives minding their own business, so I would want to know the number closest to the truth, versus the number that best supports the purpose of breathing fire into a political forum.
Why do I tend to out more stock in the Hamas numbers than I do the IDF numbers? According to this, the World Health Organization characterizes the Health Ministry numbers as, if not "perfectly accurate on a minute-to-minute basis", then at least as being "largely reflect[ive of] the level of death and injury" during the siege.
Also, Israel sealed Gaza’s borders and barred foreign journalists and humanitarian workers from even entering the area from the very beginning. That's the action of a party that has an interest in shielding what's happening in the area from the outside world.
I wouldn't take the numbers of either side as being ... ahem ... the gospel truth, but I do believe that one side's numbers are probably more accurate than the other's. In the end, though, we won't know anything that's closer to the truth than either side's for years, if at all, and even then, it will be at the behest of the party that gets to write it all up as history.