Depends on the barb...and the dwarf cichlid for that matter, the easiest to find and keep being apistogramma cacatuoides, but certain barbs can be aggressive or nippy, such as tiger barbs. I prefer to stay in the biotopes anyway and most tetras work great with apistos
And a pair would be fine given that there are several places to hide, two males would even work, they're more colorful