title: How to count number of examples of a model, depending on a (given) attribute value?
body: <p>Thanks in advance for any help on this, apologies if I'm being a glaring novice.</p>
  
  <p>I need to be able to count the number of examples of a model that have attribute value to that which I'm searching for.</p>
  
  <p>e.g. If I had a model 'zoo' with many 'animals', how could I count the number of 'animals' within a 'zoo', with the 'name' attribute of 'gorilla'?  </p>
  
  <p>I'm pretty sure I know how the function would look on paper but, being very new to rails, I'm not confident in implementing it, or even sure that there isn't a simple, built in option. Selecting by name attribute &amp; then .size-ing the selection, for example?</p>
  
  <p>Thanks again!!</p>