I am trying to draw a layout for inverter and i am not sure about how many contacts to be placed in the diffussion region of NMOS and PMOS and what is the reason behind selecting that particular number of contact?

I am using Cadence Virtuoso tool for layout editing