Maximum number of SN74HC165N

they share negative and also positive.

Do you mean by that they are powered from a 5V pin on the Arduino or directly from the power supply ? It sounds like the former and, if so, it is the wrong way to do it.