* How many books do you have? The most common way to ask this is: Wie viele Bücher hast du? (informal, singular "you") or Wie viele Bücher haben Sie? (formal, plural "you").
* How many books are there? (referring to a collection): Wie viele Bücher gibt es? This is suitable if you're asking about the number of books in a specific place (like a library) or a general collection.
Therefore, there isn't one single translation. The best choice depends on the context.