aparo/pyes — pull request #431 by sk7 (2014-07-30 15:53:52+00:00)
Title: Fixed count

when trying `count()` (default query: `MatchAllQuery`) Elastic Search would throw an exception. other querys had similar strange errors.

```
failed to executed [[[history]][], source[{"match_all": {}}]]
org.elasticsearch.index.query.QueryParsingException: [history] request does not support [match_all]
```

ES now expects the query to be wrapped like this.`{"query": .... }`
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-count.html

since other methods used `query.serialize()` instead of `self._encode_query(query)`, I thought I should use it too