public function getTypeCount($indexName, $typeName, $query = '')
    {
        $index = $this->getIndex($indexName);
        $type = $index->getType($typeName);

        return $type->count($query);
    }