Step 1: Understanding the Concept
Pyridine \(\text{C}_5\text{H}_5\text{N}\) is a six-membered aromatic ring containing one nitrogen.
Step 2: Count
The ring has three double bonds, each contributing 2 pi electrons.
Step 3: Nitrogen lone pair
The lone pair on nitrogen lies in the plane of the ring (sp2 orbital), so it is not part of the pi system.
Step 4: Total
\(3\times2=6\) pi electrons, option (D). This follows the Huckel rule \(4n+2\) with \(n=1\).
Final Answer:
Pyridine has 6 pi electrons.
\[ \boxed{\text{(D) }6} \]