Beryllium has two valence electrons in its ground state.
The electron configuration of beryllium is 1s² 2s². The valence electrons are those present in the outermost energy level, which in this case is the 2s sublevel. There are two electrons in the 2s sublevel, so beryllium has two valence electrons.