Question: can you just have 1 guinea pig?
Answer: Yes, It is ok to have one guinea pig. In fact, males are solitary in the wild, while females enjoy being in the company. If you have enough time to dedicate to your guinea pig, interact and play with them then it is completely fine to own a boar. Else you should go for a pair or more of Sows.