Added Search::hasType and hasIndex methods. Fixed Index::count() method