one view show nodes and their referenced nodes - both only published I have 2 content types. Question and Answer. Answers hava a entity reference field and contain reference to certain questions.
Now, I want to build a view with listing of questions and number of answers to each question.

So, my view has one field title. Another field title with set up relationship (to show related answers). Filter is set up to show only published nodes and node types of Question and Answer. Query setings - distinct.

Result: I get all questions with all answers. Like this:
Q1 (published)
-someanswer1 (published)
-someanswer2 (unpublished)
Q2 (published)
-someanswer3 (unpublished)
-someanswer4 (unpublished)


Problem: Only Questions get filtered by using filter - published nodes. The referenced nodes - answers are not filtered and are shown all published as well as unpublished.


What would be the best approach to show ONLY published both answers and questions? Thank you
While there might be other approaches, I'd go with Views Field View. 

It allows you to use a view as a field in another view. Then just build a view for the answers, taking a nid argument as an entity reference contextual filter. And use that view as field in your question listing view.