Replacing light switch with dimmer switch... white wire?
Since the 4 white wires are already connected, they need to stay connected.  It would be correct to wire all 6 whites together.  Note that for 6x #14 wires you need to use a new red wire nut.