title: How to get count of items with same ids which are not in adapter view
body: <p>I have the case where multiple instances of an item are there and I want to count them. 
  My view matcher is as follows:</p>
  
  <pre><code> public static ViewInteraction onTestPanelView(){
          return onView(allOf(withId(R.id.myId), isDisplayed()));
      }
  </code></pre>
  
  <p>With the view matcher, I get the following error:</p>
  
  <blockquote>
    <p>com.google.android.apps.common.testing.ui.espresso.AmbiguousViewMatcherException:
    '(with id: is &lt;2131427517> and is displayed on the screen to the
    user)' matches multiple views in the hierarchy. Problem views are
    marked with '****MATCHES****' below.</p>
  </blockquote>
  
  <p>This is correct because I have the multiple instance of items with same id (R.id.myId). I want to write a method which returns me the count of the views matching my criteria. Please note - they are not in adapter view.</p>