I don't know on which basis we count the tectonic plates. And I'm confused because I think they are 5 but the answer is 3. As the illustration shows that there are a mid oceanic ridge which is formed because of a divergent plate motion between two oceanic plates and an oceanic trench which is formed due to covergent plate motion between two oceanic plates, so I think that there are three oceanic plates plus two continental plates which are at the two edges of the illustration. Am I right?
This is primarily an exercise in interpreting a minimalist diagram. Believe me, you will have to learn to read even sketchier diagrams.
That said, the test had the correct answer to the question. Unambiguously, there are only three plates.
The left and right plates each contain a piece of continental crust and a piece of oceanic crust connected by a passive continental margin. In each case, the oceanic bit and the continental bit move as a unit, so there's only one plate on the left and only one on the right. With the middle, oceanic-only plate, that makes three.
Although the diagram you gave us is a little more simplified than I'm comfortable with, you can tell that whoever drew the diagram meant for the left and right plates to contain passive margins. The elliptical loops of arrows are intended to be interpreted as convection cells in the mantle, and each cell drags the lithosphere above as a unit. So, anything above any one convection cell should be interpreted as one plate.
Here is a slightly more detailed diagram showing a passive margin:
(Source: Wikipedia, CC 3.0)
There are three plates, because there are two plate boundaries (marked in blue): a convergent margin to the left, and a divergent margin to the right.
Lithospheric plate #2 contains only oceanic crust. Lithospheric plates #1 and #3 contain both continental and oceanic crusts. Note the difference between the terms plate and crust.
The place where continental and oceanic crusts meet within a single lithospheric plate is called a passive margin.
It may have been a lithospheric plate margin in the past, but now it is a fossil margin and is not active.