fixed findType function: search id in variable databases count