Nico got 9 wins, but how many of those came when Hamilton couldn't challenge him equally because of car issues? E.g. China, Russia, Belguim. Even Singapore to a certain degree. While Hamilton also should have won in Malayisa.
As for Nico's poles in 2016
China--Hamilton didn't take part in qualifying due technical issues with the car
Russia-Hamilton didn't take part in qualifying due to engine issues
Hungary- Hamilton had gone quickest in the first sector but was forced to back off when Alonso in the McLaren spun off in front of him .
Belgium-Hamilton didn't take part in quali due to engine penalties
Singapore-Due to car issues, Hamilton misses FP2 & FP3, causing him to go into qualifying unprepared, having done no laps in night time conditions.
Monaco-Q3 engine issues
So, that leaves Baku, Japan & Germany. 3 poles he beat Hamilton to on pure merit.