1067 fix ontologies count

Shall fix #1067.