Note: An electrical box as a sealed container for connecting groups of wires. This means that the circuit could split within this junction box and run to numerous other electrical devices such as outlets and light fixtures. If this electrical box is used to split the circuit there could be many black, white and ground wires, where each color group is connected together. You may even find red coded wires if there are multiple or 3-way and 4-way switches. This scenario could apply to any of the wiring diagrams presented.
Additional information about electricity.