title: Error while counting number of entries in a Mongo database using pymongo
body: <p>I am trying to access my MongoDB database with pymongo in Python 2.7. Unfortunately, when I try to count the number of times a key/value pair appears in my database I get an error. If I concatenate all my function calls together, the following line of code is how I am counting the number of times the object appears.</p>
  
  <pre><code>MongoClient(&lt;My Mongo Connection&gt;).get_default_database(['media'].find("media_url":data["media_url"]).count()
  </code></pre>
  
  <p>Part of the corresponding error is as follows:</p>
  
  <pre><code>  File "&lt;File Path Removed for Privacy&gt;/lib/python2.7/site-packages/pymongo/topology.py", line 97, in select_servers
  self._error_message(selector))
  pymongo.errors.ServerSelectionTimeoutError: No replica set members found yet
  </code></pre>
  
  <p>What does this error mean and how do I fix it? I have made sure that my MongoDB connection string is correct. I am a newbie with MongoDB and interfacing it with Flask applications, so any advice is greatly appreciated!</p>