parameters: ()
docstring: Return the total number of entities
  
      :return: number of entities (or -1 if there was some error)
docstring_summary: Return the total number of entities
docstring_tokens: Return the total number of entities
function: def get_entities_count():
      """
      Return the total number of entities
  
      :return: number of entities (or -1 if there was some error)
      """
  
      # Trick: asking for a non existing attribute (attrs=noexist) will make response very small (only entity id/type)
      res = requests.get(cb_endpoint + '/v2/entities?limit=1&options=count&attrs=noexist' + filter, headers=headers,
                         verify=False)
      if res.status_code != 200:
          print 'Error getting entities count (%d): %s' % (res.status_code, res.json())
          return -1
      else:
          return int(res.headers['fiware-total-count'])
function_tokens: def get_entities_count ( ) : # Trick: asking for a non existing attribute (attrs=noexist) will make response very small (only entity id/type) res = requests . get ( cb_endpoint + '/v2/entities?limit=1&options=count&attrs=noexist' + filter , headers = headers , verify = False ) if res . status_code != 200 : print 'Error getting entities count (%d): %s' % ( res . status_code , res . json ( ) ) return - 1 else : return int ( res . headers [ 'fiware-total-count' ] )