It is difficult to separate vanity publishing from self-publishing. Where do you draw the line between the two?
Vanity publishers often insist that what they offer is serviced self-publishing. For a fee (often a high one) they offer services like editing, typesetting and design: the problem is that there are some very useful self-publishing service providers out there which also charge for those services but which don’t count as vanity publishers.
The imprint under which you’re published provides a useful (but not infallible) guide. If you pay anything towards your own publication, either up-front by way of fees for editing, an ISBN or printing, or at the back end of the equation by buying copies of your own books for resale, then if the book has the name of your own publishing company on the imprint page it’s likely that you self-published it, while if it has the name of the service-provider as the imprint you are definitely vanity-published.
And, while there’s nothing inherently wrong with paying for expert help, remember that real, commercial publishers provide everything at no cost to the writer: it's part of the package when they agree to publish a book. If you do hand money over to anyone, make sure that the people you’re paying really are experts in their field, are going to add real value to your book: and aren’t just charging you a high price for help you don’t really need.