Error correction on get_all_count: class comparison