hacky fix for get_log_count() that allows it to be filtered. #1628