Answer: B
The compound shown is histamine. The side-chain primary amine nitrogen has a localised sp3 lone pair, and the imidazole nitrogen without hydrogen has its lone pair in the ring plane, so both are basic. The N-H nitrogen's lone pair is part of the aromatic sextet. Hence 2.