This goes to the heart of why we don't recommend someone self-publish a book if what they really want is a commercial contract.
As a matter of fact, the fact that you sold only a couple of copies to friends and family is, if anything, a negative factor rather than the positive factor you hoped. If you were to query it (and, of course, say up-front that it had been self-published), the agent/editor would likely check its sales figures, and seeing them so low would suggest that you've already tapped out any built-iin audience.
That said, if you still really want to try for a commecial deal, as long as you're upfront about the publishing history, there's no harm in querying. If the manuscript happens to land on the desk of someone who totally falls in love with it and believes they can make a success out of it, the self-publishing history won't matter.