title: Protractor - variable assigned to element.all.locator.count is returning NaN why?
body: <p>I am using Protractor, and trying to grab all elements within a drop down list.</p>
  
  <p>I have the following and this part appears to be working:</p>
  
  <pre><code>var counter = element.all(By.className('class')).count();
  console.log(counter);
  </code></pre>
  
  <p>I expected the value to be 43 instead I received this from the console log:</p>
  
  <pre><code>{ then: [Function: then],
    cancel: [Function: cancel],
    isPending: [Function: isPending] }
  </code></pre>
  
  <p>So not giving up, I then decided to see if I can output this value to a search bar inside the web application I'm testing on. To see what value it displays:</p>
  
  <pre><code>element(by.className('search_bar')).sendKeys(counter);
  </code></pre>
  
  <p>When I run it again:
  I see the value in the search bar become populated with 43. This is what I am expecting to be what counter is equal to.</p>
  
  <p>I then proceed to use the variable 'counter' in other places, and I keep getting values back as:</p>
  
  <pre><code>NaN
  </code></pre>
  
  <p>How do I get it to pass the actual number value of 43 but as a variable.</p>